Class: ActiveSaga::DSL::Steps::StepDefinition

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_saga/dsl/steps.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStepDefinition

Returns a new instance of StepDefinition.



7
8
9
10
# File 'lib/active_saga/dsl/steps.rb', line 7

def initialize(*)
  super
  self.options = self[:options]
end

Instance Attribute Details

#callableObject

Returns the value of attribute callable

Returns:

  • (Object)

    the current value of callable



6
7
8
# File 'lib/active_saga/dsl/steps.rb', line 6

def callable
  @callable
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



6
7
8
# File 'lib/active_saga/dsl/steps.rb', line 6

def name
  @name
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



6
7
8
# File 'lib/active_saga/dsl/steps.rb', line 6

def options
  @options
end

#styleObject

Returns the value of attribute style

Returns:

  • (Object)

    the current value of style



6
7
8
# File 'lib/active_saga/dsl/steps.rb', line 6

def style
  @style
end

Instance Method Details

#async?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/active_saga/dsl/steps.rb', line 28

def async?
  options[:async] || false
end

#dedupe?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/active_saga/dsl/steps.rb', line 32

def dedupe?
  options[:dedupe] || false
end

#dupObject



20
21
22
# File 'lib/active_saga/dsl/steps.rb', line 20

def dup
  self.class.new(name:, style:, callable:, options: deep_dup(options))
end

#fire_and_forget?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/active_saga/dsl/steps.rb', line 36

def fire_and_forget?
  options[:fire_and_forget] || false
end

#to_hObject



24
25
26
# File 'lib/active_saga/dsl/steps.rb', line 24

def to_h
  { name:, style:, callable:, options: deep_dup(options) }
end