Class: Smith::Workflow::Graph::Reachability

Inherits:
Object
  • Object
show all
Defined in:
lib/smith/workflow/graph/reachability.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(graph) ⇒ Reachability

Returns a new instance of Reachability.



9
10
11
# File 'lib/smith/workflow/graph/reachability.rb', line 9

def initialize(graph)
  @graph = graph
end

Instance Attribute Details

#graphObject (readonly)

Returns the value of attribute graph.



7
8
9
# File 'lib/smith/workflow/graph/reachability.rb', line 7

def graph
  @graph
end

Instance Method Details

#transition_namesObject



13
14
15
16
17
18
19
# File 'lib/smith/workflow/graph/reachability.rb', line 13

def transition_names
  return [] unless graph.initial_state

  reset_walk
  drain_queue
  @seen_transitions.keys
end