Class: Decouplio::Steps::Octo
- Defined in:
- lib/decouplio/steps/octo.rb
Instance Attribute Summary collapse
-
#hash_case ⇒ Object
Returns the value of attribute hash_case.
Attributes inherited from BaseStep
Instance Method Summary collapse
-
#initialize(name:, ctx_key:, method:) ⇒ Octo
constructor
A new instance of Octo.
- #process(instance:) ⇒ Object
Constructor Details
#initialize(name:, ctx_key:, method:) ⇒ Octo
Returns a new instance of Octo.
10 11 12 13 14 15 |
# File 'lib/decouplio/steps/octo.rb', line 10 def initialize(name:, ctx_key:, method:) super() @name = name @ctx_key = ctx_key @method = method end |
Instance Attribute Details
#hash_case ⇒ Object
Returns the value of attribute hash_case.
8 9 10 |
# File 'lib/decouplio/steps/octo.rb', line 8 def hash_case @hash_case end |
Instance Method Details
#process(instance:) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/decouplio/steps/octo.rb', line 17 def process(instance:) instance.append_railway_flow(@name) if @method instance.send(@method, **instance.ctx) else instance[@ctx_key] end end |