Class: Rley::GFG::ReturnEdge

Inherits:
Edge
  • Object
show all
Defined in:
lib/rley/gfg/return_edge.rb

Overview

Responsibilities:

  • To know the successor vertex (tail)

Instance Attribute Summary collapse

Attributes inherited from Edge

#successor

Instance Method Summary collapse

Methods inherited from Edge

#inspect, #to_s

Constructor Details

#initialize(thePredecessor, theSuccessor) ⇒ ReturnEdge

Pre-condition: thePredecessor is an EndVertex Pre-condition: theSuccessor is an ItemVertex



18
19
20
21
# File 'lib/rley/gfg/return_edge.rb', line 18

def initialize(thePredecessor, theSuccessor)
  super(thePredecessor, theSuccessor)
  do_set_key(thePredecessor, theSuccessor)
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



14
15
16
# File 'lib/rley/gfg/return_edge.rb', line 14

def key
  @key
end