class Syskit::Actions::Profile::Definition
A definition object created with {#define}
In addition to the {InstanceRequirements} duties, it also adds information about the link of the requirements with its profile
Attributes
profile[RW]
The profile this definition comes from
@return [Profile]
Public Class Methods
new(profile, name, resolved: false)
click to toggle source
Calls superclass method
# File lib/syskit/actions/profile.rb, line 38 def initialize(profile, name, resolved: false) super() self.profile = profile self.advanced = false self.name = name @resolved = resolved end
Public Instance Methods
rebind(profile)
click to toggle source
Return a definition that has a different underlying profile
# File lib/syskit/actions/profile.rb, line 47 def rebind(profile) if rebound = profile.find_definition_by_name(name) rebound.dup else result = dup result.profile = profile result end end
to_action_model()
click to toggle source
Create an action model that encapsulate this definition
Calls superclass method
# File lib/syskit/actions/profile.rb, line 58 def to_action_model if resolved? action_model = super(doc || "defined in #{profile}") action_model.advanced = advanced? action_model.name = "#{name}_def" action_model else profile.resolved_definition(name).to_action_model end end