Class: ServiceOperator::Step
- Inherits:
-
Struct
- Object
- Struct
- ServiceOperator::Step
- Defined in:
- lib/service_operator/step.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#block ⇒ Object
Returns the value of attribute block.
-
#name ⇒ Object
Returns the value of attribute name.
-
#service ⇒ Object
Returns the value of attribute service.
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
4 5 6 |
# File 'lib/service_operator/step.rb', line 4 def args @args end |
#block ⇒ Object
Returns the value of attribute block
4 5 6 |
# File 'lib/service_operator/step.rb', line 4 def block @block end |
#name ⇒ Object
Returns the value of attribute name
4 5 6 |
# File 'lib/service_operator/step.rb', line 4 def name @name end |
#service ⇒ Object
Returns the value of attribute service
4 5 6 |
# File 'lib/service_operator/step.rb', line 4 def service @service end |
Instance Method Details
#run(operator:, proc: nil) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/service_operator/step.rb', line 5 def run(operator:, proc: nil) @operator = operator return instance_exec(proc || @operator, &block) if block return perform_service_step if service perform_method_step(proc) end |