class SPNet::InPort
A port that exposes some functionality in a block.
@author James Tunnell
Constants
- ARG_SPECS
Define ArgSpec's to use in processing hashed arguments during initialize.
Attributes
link[R]
matching_class[R]
Public Class Methods
new(args)
click to toggle source
A new instance of InPort
. @param [Hash] args Hashed arguments for initialization. See InPort::ARG_SPECS
for details.
# File lib/spnet/core/in_port.rb, line 19 def initialize args hash_make args, InPort::ARG_SPECS @link = nil end
Public Instance Methods
clear_link()
click to toggle source
Set @link to nil.
# File lib/spnet/core/in_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/in_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/in_port.rb, line 25 def set_link link raise ArgumentError, "link 'to' port is not self" unless link.to == self @link = link end