Class: Syskit::Actions::Action
- Defined in:
- lib/syskit/actions/action.rb
Overview
Action representation for syskit-specific objects
Instance Method Summary collapse
- #method_missing(m, *args, &block) ⇒ Object
-
#rebind_requirements(profile) ⇒ Action
Create a new action with the same arguments but the requirements rebound to a new profile.
- #respond_to_missing?(m, include_private) ⇒ Boolean
-
#to_instance_requirements ⇒ InstanceRequirements
Return an InstanceRequirements that is equivalent to this action.
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
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
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_requirements ⇒ InstanceRequirements
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 |