Module: Roby::Interface::REST::Helpers
- Defined in:
- lib/roby/interface/rest/helpers.rb
Instance Method Summary collapse
-
#execute(&block) ⇒ Object
deprecated
Deprecated.
use #roby_execute instead
-
#execution_engine ⇒ Roby::ExecutablePlan
The underlying Roby execution engine.
-
#interface ⇒ Roby::Interface
The underlying Roby interface.
-
#roby_app ⇒ Roby::Application
The underlying Roby app.
-
#roby_execute(&block) ⇒ Object
Execute a block in a context synchronzied with the engine.
-
#roby_plan ⇒ Roby::ExecutablePlan
The underlying Roby plan.
-
#roby_storage ⇒ Object
A permanent storage hash.
Instance Method Details
#execute(&block) ⇒ Object
Deprecated.
use #roby_execute instead
46 47 48 49 50 51 52 |
# File 'lib/roby/interface/rest/helpers.rb', line 46 def execute(&block) return super unless block_given? Roby.warn_deprecated "Helpers#execute is deprecated, "\ "use #roby_execute instead" roby_execute(&block) end |
#execution_engine ⇒ Roby::ExecutablePlan
The underlying Roby execution engine
36 37 38 |
# File 'lib/roby/interface/rest/helpers.rb', line 36 def execution_engine @execution_engine ||= interface.execution_engine end |
#interface ⇒ Roby::Interface
The underlying Roby interface
10 11 12 |
# File 'lib/roby/interface/rest/helpers.rb', line 10 def interface env.fetch("roby.interface") end |
#roby_app ⇒ Roby::Application
The underlying Roby app
17 18 19 |
# File 'lib/roby/interface/rest/helpers.rb', line 17 def roby_app @roby_app ||= interface.app end |
#roby_execute(&block) ⇒ Object
Execute a block in a context synchronzied with the engine
41 42 43 |
# File 'lib/roby/interface/rest/helpers.rb', line 41 def roby_execute(&block) execution_engine.execute(&block) end |
#roby_plan ⇒ Roby::ExecutablePlan
The underlying Roby plan
24 25 26 |
# File 'lib/roby/interface/rest/helpers.rb', line 24 def roby_plan roby_app.plan end |
#roby_storage ⇒ Object
A permanent storage hash
29 30 31 |
# File 'lib/roby/interface/rest/helpers.rb', line 29 def roby_storage env.fetch("roby.storage") end |