Module: Trailblazer::Activity::Introspect
- Defined in:
- lib/trailblazer/activity/introspect.rb
Overview
The Introspect API provides inflections for ‘Activity` instances. It abstracts internals about circuits and provides a convenient API to third-parties such as tracing, rendering an activity, or finding particular tasks.
Defined Under Namespace
Classes: Graph
Class Method Summary collapse
Class Method Details
.Graph(*args) ⇒ Object
68 69 70 |
# File 'lib/trailblazer/activity/introspect.rb', line 68 def self.Graph(*args) Graph.new(*args) end |
.render_task(proc) ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/trailblazer/activity/introspect.rb', line 72 def self.render_task(proc) if proc.is_a?(Method) receiver = proc.receiver receiver = receiver.is_a?(Class) ? (receiver.name || "#<Class:0x>") : (receiver.name || "#<Module:0x>") #"#<Class:0x>" return "#<Method: #{receiver}.#{proc.name}>" elsif proc.is_a?(Symbol) return proc.to_s end proc.inspect end |