Class: Syskit::Models::OutputReader
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) ⇒ OutputReader
constructor
A new instance of OutputReader.
- #instanciate(plan) ⇒ Object
Constructor Details
#initialize(port, policy = Hash.new) ⇒ OutputReader
Returns a new instance of OutputReader
262 263 264 265 |
# File 'lib/syskit/models/port.rb', line 262 def initialize(port, policy = Hash.new) @port = port @policy = policy end |
Instance Attribute Details
#policy ⇒ Object (readonly)
Returns the value of attribute policy
260 261 262 |
# File 'lib/syskit/models/port.rb', line 260 def policy @policy end |
#port ⇒ Object (readonly)
Returns the value of attribute port
259 260 261 |
# File 'lib/syskit/models/port.rb', line 259 def port @port end |
Instance Method Details
#==(other) ⇒ Object
269 270 271 |
# File 'lib/syskit/models/port.rb', line 269 def ==(other) other.port == port && other.policy == policy end |
#bind(port_or_task) ⇒ Object
273 274 275 276 277 278 279 |
# File 'lib/syskit/models/port.rb', line 273 def bind(port_or_task) if port_or_task.respond_to?(:reader) port_or_task.reader(policy) else port.bind(port_or_task).reader(policy) end end |
#eql?(other) ⇒ Boolean
268 |
# File 'lib/syskit/models/port.rb', line 268 def eql?(other); self == other end |
#hash ⇒ Object
267 |
# File 'lib/syskit/models/port.rb', line 267 def hash; [port, policy].hash end |
#instanciate(plan) ⇒ Object
281 282 283 |
# File 'lib/syskit/models/port.rb', line 281 def instanciate(plan) port.instanciate(plan).reader(policy) end |