Module: Trailblazer::Developer::Introspect

Defined in:
lib/trailblazer/developer/introspect.rb,
lib/trailblazer/developer/introspect/graph.rb

Defined Under Namespace

Classes: Graph

Class Method Summary collapse

Class Method Details

.find_path(activity_class, segments) ⇒ Object

find the path for Strategy subclasses. FIXME: will be removed



6
7
8
9
10
11
12
13
14
# File 'lib/trailblazer/developer/introspect.rb', line 6

def self.find_path(activity_class, segments)
  activity = activity_class.is_a?(Class) ? activity_class.to_h[:activity] : activity_class # FIXME: not a real fan of this, maybe always do {to_h[:activity]}

  node, activity, graph = Activity::Introspect.find_path(activity, segments)

  activity = activity.is_a?(Class) ? activity.to_h[:activity] : activity # FIXME: not a real fan of this, maybe always do {to_h[:activity]}

  return node, activity, graph
end

.Graph(*args) ⇒ Object



78
79
80
# File 'lib/trailblazer/developer/introspect/graph.rb', line 78

def self.Graph(*args)
  Graph.new(*args)
end