Class: ActiveSaga::DSL::Steps::StepDefinition
- Inherits:
-
Struct
- Object
- Struct
- ActiveSaga::DSL::Steps::StepDefinition
- Defined in:
- lib/active_saga/dsl/steps.rb
Instance Attribute Summary collapse
-
#callable ⇒ Object
Returns the value of attribute callable.
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#style ⇒ Object
Returns the value of attribute style.
Instance Method Summary collapse
- #async? ⇒ Boolean
- #dedupe? ⇒ Boolean
- #dup ⇒ Object
- #fire_and_forget? ⇒ Boolean
-
#initialize ⇒ StepDefinition
constructor
A new instance of StepDefinition.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ StepDefinition
Returns a new instance of StepDefinition.
7 8 9 10 |
# File 'lib/active_saga/dsl/steps.rb', line 7 def initialize(*) super self. = self[:options] end |
Instance Attribute Details
#callable ⇒ Object
Returns the value of attribute callable
6 7 8 |
# File 'lib/active_saga/dsl/steps.rb', line 6 def callable @callable end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/active_saga/dsl/steps.rb', line 6 def name @name end |
#options ⇒ Object
Returns the value of attribute options
6 7 8 |
# File 'lib/active_saga/dsl/steps.rb', line 6 def @options end |
#style ⇒ Object
Returns the value of attribute style
6 7 8 |
# File 'lib/active_saga/dsl/steps.rb', line 6 def style @style end |
Instance Method Details
#async? ⇒ Boolean
28 29 30 |
# File 'lib/active_saga/dsl/steps.rb', line 28 def async? [:async] || false end |
#dedupe? ⇒ Boolean
32 33 34 |
# File 'lib/active_saga/dsl/steps.rb', line 32 def dedupe? [:dedupe] || false end |
#dup ⇒ Object
20 21 22 |
# File 'lib/active_saga/dsl/steps.rb', line 20 def dup self.class.new(name:, style:, callable:, options: deep_dup()) end |
#fire_and_forget? ⇒ Boolean
36 37 38 |
# File 'lib/active_saga/dsl/steps.rb', line 36 def fire_and_forget? [:fire_and_forget] || false end |
#to_h ⇒ Object
24 25 26 |
# File 'lib/active_saga/dsl/steps.rb', line 24 def to_h { name:, style:, callable:, options: deep_dup() } end |