class SPNet::OutPort
A port that is used to exercise some functionality exposed by an InPort
.
@author James Tunnell
Constants
- ARG_SPECS
Define ArgSpec's to use in processing hashed arguments during initialize.
Attributes
link[R]
matching_class[R]
name[R]
Public Class Methods
new(args)
click to toggle source
A new instance of OutPort
. @param [Hash] args Hashed arguments for initialization. See OutPort::ARG_SPECS
for details.
# File lib/spnet/core/out_port.rb, line 19 def initialize args hash_make args, OutPort::ARG_SPECS @link = nil end
Public Instance Methods
clear_link()
click to toggle source
Set @link to nil.
# File lib/spnet/core/out_port.rb, line 31 def clear_link @link = nil end
linked?()
click to toggle source
Return true if @link is not nil.
# File lib/spnet/core/out_port.rb, line 36 def linked? !link.nil? end
set_link(link)
click to toggle source
Set @link to the given Link
object.
# File lib/spnet/core/out_port.rb, line 25 def set_link link raise ArgumentError, "link 'from' port is not self" unless link.from == self @link = link end