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.
- .reload ⇒ Object
- .start(app, json = nil) ⇒ Object
- .stop(app) ⇒ Object
-
.system_reload ⇒ 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 |
# File 'lib/device/runtime.rb', line 14 def self.execute(app, json = nil) execution_ret = mrb_eval("Context.execute('#{app}', '#{Device.adapter}', '#{json}')", app) self.system_reload return execution_ret end |
.reload ⇒ Object
37 38 39 |
# File 'lib/device/runtime.rb', line 37 def self.reload self.adapter.reload end |
.start(app, json = nil) ⇒ Object
20 21 22 |
# File 'lib/device/runtime.rb', line 20 def self.start(app, json = nil) mrb_eval("Context.start('#{app}', '#{Device.adapter}', '#{json}')", app) end |
.stop(app) ⇒ Object
24 25 26 |
# File 'lib/device/runtime.rb', line 24 def self.stop(app) mrb_stop(app) end |
.system_reload ⇒ NilClass
Check if any change has happen to Network, Settings or ParamsDat
30 31 32 33 34 35 |
# File 'lib/device/runtime.rb', line 30 def self.system_reload Device::Setting.setup DaFunk::ParamsDat.setup Device::Network.setup nil end |