Exception: GraphTraversalException

Inherits:
Exception
  • Object
show all
Defined in:
lib/fsm-0.0.0/graph/directed_graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, links, linkInfo) ⇒ GraphTraversalException

Returns a new instance of GraphTraversalException.



26
27
28
29
# File 'lib/fsm-0.0.0/graph/directed_graph.rb', line 26

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.



25
26
27
# File 'lib/fsm-0.0.0/graph/directed_graph.rb', line 25

def link_info
  @link_info
end

Returns the value of attribute links.



25
26
27
# File 'lib/fsm-0.0.0/graph/directed_graph.rb', line 25

def links
  @links
end

#nodeObject (readonly)

Returns the value of attribute node.



25
26
27
# File 'lib/fsm-0.0.0/graph/directed_graph.rb', line 25

def node
  @node
end

Instance Method Details

#messageObject Also known as: inspect



31
32
33
# File 'lib/fsm-0.0.0/graph/directed_graph.rb', line 31

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