Module: OroGen::Spec::DynamicPort
- Included in:
- DynamicInputPort, DynamicOutputPort
- Defined in:
- lib/orogen/spec/dynamic_ports.rb
Instance Method Summary collapse
- #dynamic? ⇒ Boolean
- #each_interface_type ⇒ Object
- #instanciate(name, type = nil) ⇒ Object
- #pretty_print(pp) ⇒ Object
Instance Method Details
#dynamic? ⇒ Boolean
16 |
# File 'lib/orogen/spec/dynamic_ports.rb', line 16 def dynamic?; true end |
#each_interface_type ⇒ Object
18 19 20 21 |
# File 'lib/orogen/spec/dynamic_ports.rb', line 18 def each_interface_type return enum_for(__method__) if !block_given? super if type end |
#instanciate(name, type = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/orogen/spec/dynamic_ports.rb', line 4 def instanciate(name, type = nil) m = dup m.instance_variable_set :@name, name if type if type.respond_to?(:to_str) type = task.project.find_type(type) end m.instance_variable_set :@type, type end m end |
#pretty_print(pp) ⇒ Object
23 24 25 |
# File 'lib/orogen/spec/dynamic_ports.rb', line 23 def pretty_print(pp) pp.text "[dyn,#{self.class < InputPort ? "in" : "out"}]#{name}:#{if type then type.name else "any type" end}" end |