Class: Hanuman::DirectedLink

Inherits:
Object
  • Object
show all
Defined in:
lib/hanuman/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, into) ⇒ DirectedLink

Returns a new instance of DirectedLink.



25
26
27
28
# File 'lib/hanuman/link.rb', line 25

def initialize(from, into)
  @from = from
  @into = into
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



23
24
25
# File 'lib/hanuman/link.rb', line 23

def from
  @from
end

#intoObject

Returns the value of attribute into.



23
24
25
# File 'lib/hanuman/link.rb', line 23

def into
  @into
end

Instance Method Details

#to_sObject



30
31
32
# File 'lib/hanuman/link.rb', line 30

def to_s
  "#<#{self.class}(#{from.to_s} -> #{into.to_s})>"
end