Class: Trailblazer::Activity
- Inherits:
-
Object
- Object
- Trailblazer::Activity
- Extended by:
- Call
- Defined in:
- lib/trailblazer/activity.rb,
lib/trailblazer/activity/adds.rb,
lib/trailblazer/activity/schema.rb,
lib/trailblazer/activity/circuit.rb,
lib/trailblazer/activity/deprecate.rb,
lib/trailblazer/activity/task_wrap.rb,
lib/trailblazer/activity/introspect.rb,
lib/trailblazer/activity/structures.rb,
lib/trailblazer/activity/schema/compiler.rb,
lib/trailblazer/activity/task_wrap/runner.rb,
lib/trailblazer/activity/introspect/render.rb,
lib/trailblazer/activity/task_wrap/pipeline.rb,
lib/trailblazer/activity/schema/intermediate.rb,
lib/trailblazer/activity/task_wrap/call_task.rb,
lib/trailblazer/activity/task_wrap/extension.rb,
lib/trailblazer/activity/circuit/task_adapter.rb,
lib/trailblazer/activity/schema/implementation.rb
Overview
This is DSL-independent code, focusing only on run-time.
Developer’s docs: trailblazer.to/2.1/docs/internals.html#internals-activity
Defined Under Namespace
Modules: Adds, Call, Deprecate, Introspect, TaskBuilder, TaskWrap, Testing Classes: Circuit, End, Left, Output, Right, Schema, Signal, Start
Class Method Summary collapse
-
.End(semantic) ⇒ Object
Builds an End instance.
-
.Output(signal, semantic) ⇒ Object
Builds an Output instance.
Instance Method Summary collapse
- #call(args, **circuit_options) ⇒ Object
-
#initialize(schema) ⇒ Activity
constructor
A new instance of Activity.
- #inspect ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(schema) ⇒ Activity
Returns a new instance of Activity.
6 7 8 |
# File 'lib/trailblazer/activity.rb', line 6 def initialize(schema) @schema = schema end |
Class Method Details
Instance Method Details
#call(args, **circuit_options) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/trailblazer/activity.rb', line 10 def call(args, **) @schema[:circuit].( args, **.merge(activity: self) ) end |
#inspect ⇒ Object
21 22 23 |
# File 'lib/trailblazer/activity.rb', line 21 def inspect %(#<Trailblazer::Activity:0x#{object_id}>) end |
#to_h ⇒ Object
17 18 19 |
# File 'lib/trailblazer/activity.rb', line 17 def to_h @schema.to_h end |