Class: Syskit::Actions::Action

Inherits:
Roby::Actions::Action
  • Object
show all
Defined in:
lib/syskit/actions/action.rb

Overview

Action representation for syskit-specific objects

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



26
27
28
29
30
31
# File 'lib/syskit/actions/action.rb', line 26

def method_missing(m, *args, &block)
    if model.requirements.respond_to?(m)
        Action.new(model.public_send(m, *args, &block), arguments)
    else super
    end
end

Instance Method Details

#rebind_requirements(profile) ⇒ Action

Create a new action with the same arguments but the requirements rebound to a new profile

Parameters:

  • the (Profile)

    profile onto which definitions should be rebound

Returns:



18
19
20
# File 'lib/syskit/actions/action.rb', line 18

def rebind_requirements(profile)
    model.rebind_requirements(profile).new(arguments)
end

#respond_to_missing?(m, include_private) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/syskit/actions/action.rb', line 22

def respond_to_missing?(m, include_private)
    model.requirements.respond_to?(m) || super
end

#to_instance_requirementsInstanceRequirements

Return an InstanceRequirements that is equivalent to this action



8
9
10
# File 'lib/syskit/actions/action.rb', line 8

def to_instance_requirements
    model.to_instance_requirements(arguments)
end