Module: Roby::Interface::REST::Helpers

Defined in:
lib/roby/interface/rest/helpers.rb

Instance Method Summary collapse

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_engineRoby::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

#interfaceRoby::Interface

The underlying Roby interface

Returns:



10
11
12
# File 'lib/roby/interface/rest/helpers.rb', line 10

def interface
    env.fetch("roby.interface")
end

#roby_appRoby::Application

The underlying Roby app

Returns:



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_planRoby::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_storageObject

A permanent storage hash



29
30
31
# File 'lib/roby/interface/rest/helpers.rb', line 29

def roby_storage
    env.fetch("roby.storage")
end