Class: Syskit::Models::InputWriter
Instance Attribute Summary collapse
-
#policy ⇒ Object
readonly
Returns the value of attribute policy.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #bind(port_or_task) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(port, policy = Hash.new) ⇒ InputWriter
constructor
A new instance of InputWriter.
- #instanciate(plan) ⇒ Object
- #new_sample ⇒ Object
Constructor Details
#initialize(port, policy = Hash.new) ⇒ InputWriter
Returns a new instance of InputWriter
296 297 298 299 |
# File 'lib/syskit/models/port.rb', line 296 def initialize(port, policy = Hash.new) @port = port @policy = policy end |
Instance Attribute Details
#policy ⇒ Object (readonly)
Returns the value of attribute policy
294 295 296 |
# File 'lib/syskit/models/port.rb', line 294 def policy @policy end |
#port ⇒ Object (readonly)
Returns the value of attribute port
293 294 295 |
# File 'lib/syskit/models/port.rb', line 293 def port @port end |
Instance Method Details
#==(other) ⇒ Object
303 304 305 |
# File 'lib/syskit/models/port.rb', line 303 def ==(other) other.port == port && other.policy == policy end |
#bind(port_or_task) ⇒ Object
307 308 309 310 311 312 313 |
# File 'lib/syskit/models/port.rb', line 307 def bind(port_or_task) if port_or_task.respond_to?(:writer) port_or_task.writer(policy) else port.bind(port_or_task).writer(policy) end end |
#eql?(other) ⇒ Boolean
302 |
# File 'lib/syskit/models/port.rb', line 302 def eql?(other); self == other end |
#hash ⇒ Object
301 |
# File 'lib/syskit/models/port.rb', line 301 def hash; [port, policy].hash end |
#instanciate(plan) ⇒ Object
315 316 317 |
# File 'lib/syskit/models/port.rb', line 315 def instanciate(plan) port.instanciate(plan).writer(policy) end |
#new_sample ⇒ Object
319 320 321 |
# File 'lib/syskit/models/port.rb', line 319 def new_sample port.new_sample end |