Class: Trailblazer::Activity::End
- Inherits:
-
Object
- Object
- Trailblazer::Activity::End
- Defined in:
- lib/trailblazer/activity/structures.rb
Overview
An End event is a simple structure typically found as the last task invoked in an activity. The special behavior is that it a) maintains a semantic that is used to further connect that very event b) its ‘End#call` method returns the end instance itself as the signal.
Direct Known Subclasses
Instance Method Summary collapse
- #call(args, circuit_options) ⇒ Object
-
#initialize(semantic:, **options) ⇒ End
constructor
A new instance of End.
- #to_h ⇒ Object
- #to_s ⇒ Object (also: #inspect)
Constructor Details
#initialize(semantic:, **options) ⇒ End
Returns a new instance of End.
17 18 19 |
# File 'lib/trailblazer/activity/structures.rb', line 17 def initialize(semantic:, **) @options = .merge(semantic: semantic) end |
Instance Method Details
#call(args, circuit_options) ⇒ Object
21 22 23 |
# File 'lib/trailblazer/activity/structures.rb', line 21 def call(args, ) return self, args, end |
#to_h ⇒ Object
25 26 27 |
# File 'lib/trailblazer/activity/structures.rb', line 25 def to_h @options end |
#to_s ⇒ Object Also known as: inspect
29 30 31 |
# File 'lib/trailblazer/activity/structures.rb', line 29 def to_s %{#<#{self.class.name} #{@options.collect{ |k,v| "#{k}=#{v.inspect}" }.join(" ")}>} end |