Class: SPNet::ParamOutPort
- Defined in:
- lib/spnet/ports/param_out_port.rb
Overview
Output value to a connected ParamInPort object.
Constant Summary
Constants inherited from OutPort
Instance Attribute Summary
Attributes inherited from OutPort
Instance Method Summary collapse
-
#get_value ⇒ Object
If linked, return the result of calling the connected ParamInPort object’s get_value method.
-
#initialize ⇒ ParamOutPort
constructor
A new instance of ParamOutPort.
-
#set_value(value) ⇒ Object
If linked, return the result of calling the connected ParamInPort object’s set_value method.
Methods inherited from OutPort
#clear_link, #linked?, #set_link
Constructor Details
#initialize ⇒ ParamOutPort
A new instance of ParamOutPort.
9 10 11 |
# File 'lib/spnet/ports/param_out_port.rb', line 9 def initialize super(:matching_class => ParamInPort) end |
Instance Method Details
#get_value ⇒ Object
If linked, return the result of calling the connected ParamInPort object’s get_value method. Otherwise, return false.
24 25 26 27 28 29 |
# File 'lib/spnet/ports/param_out_port.rb', line 24 def get_value if linked? return @link.to.get_value end return false end |
#set_value(value) ⇒ Object
If linked, return the result of calling the connected ParamInPort object’s set_value method. Otherwise, return false.
15 16 17 18 19 20 |
# File 'lib/spnet/ports/param_out_port.rb', line 15 def set_value value if linked? return @link.to.set_value value end return false end |