Exception: GraphTraversalException

Inherits:
Exception
  • Object
show all
Defined in:
lib/graphr/directed_graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, links, linkInfo) ⇒ GraphTraversalException

Returns a new instance of GraphTraversalException.



23
24
25
26
# File 'lib/graphr/directed_graph.rb', line 23

def initialize(node, links, linkInfo)
  @node, @links, @link_info = node, links, linkInfo
  super(message)
end

Instance Attribute Details

Returns the value of attribute link_info.



22
23
24
# File 'lib/graphr/directed_graph.rb', line 22

def link_info
  @link_info
end

Returns the value of attribute links.



22
23
24
# File 'lib/graphr/directed_graph.rb', line 22

def links
  @links
end

#nodeObject (readonly)

Returns the value of attribute node.



22
23
24
# File 'lib/graphr/directed_graph.rb', line 22

def node
  @node
end

Instance Method Details

#messageObject Also known as: inspect



28
29
30
# File 'lib/graphr/directed_graph.rb', line 28

def message
  "There is no link from #{@node.inspect} having info #{@link_info.inspect} (valid links are #{@links.inspect})"  
end