Class: Device::Runtime
- Inherits:
-
Object
- Object
- Device::Runtime
- Defined in:
- lib/device/runtime.rb
Class Method Summary collapse
- .adapter ⇒ Object
-
.execute(app, json = nil) ⇒ Object
Execute app in new context.
-
.system_reaload ⇒ NilClass
Check if any change has happen to Network, Settings or ParamsDat.
Class Method Details
.adapter ⇒ Object
3 4 5 |
# File 'lib/device/runtime.rb', line 3 def self.adapter Device.adapter::Runtime end |
.execute(app, json = nil) ⇒ Object
Execute app in new context.
To execute the should exists a zip file cotain the app,
previously downloaded from CloudWalk.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/device/runtime.rb', line 14 def self.execute(app, json = nil) unless app.include?(".") zip = "./#{app}.zip" Device::Display.clear raise File::FileError, zip unless File.exists?(zip) raise "Problem to unzip #{zip}" unless Zip.uncompress(zip, app) end execution_ret = mrb_eval("Context.start('#{app}', '#{Device.adapter}', '#{json}')") self.system_reaload return execution_ret end |