Sha256: eb9ae57a8a736944cf401f432efecd3e472d929ac6a79879710273cb68df213f

Contents?: true

Size: 685 Bytes

Versions: 4

Compression:

Stored size: 685 Bytes

Contents

module SPNet

# Output value to a connected ParamInPort object.
#
# @author James Tunnell
class ParamOutPort < OutPort

  # A new instance of ParamOutPort.
  def initialize
    super(:matching_class => ParamInPort)
  end
  
  # If linked, return the result of calling the connected ParamInPort object's
  # set_value method. Otherwise, return false.
  def set_value value
    if linked?
      return @link.to.set_value value
    end
    return false
  end

  # If linked, return the result of calling the connected ParamInPort object's
  # get_value method. Otherwise, return false.
  def get_value
    if linked?
      return @link.to.get_value
    end
    return false
  end

end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spnet-0.1.8 lib/spnet/ports/param_out_port.rb
spnet-0.1.7 lib/spnet/ports/param_out_port.rb
spnet-0.1.6 lib/spnet/ports/param_out_port.rb
spnet-0.1.5 lib/spnet/ports/param_out_port.rb