Module: Pathway::Plugins::Base::ClassMethods
- Defined in:
- lib/pathway.rb
Instance Attribute Summary collapse
-
#result_key ⇒ Object
Returns the value of attribute result_key.
Instance Method Summary collapse
Instance Attribute Details
#result_key ⇒ Object
Returns the value of attribute result_key.
102 103 104 |
# File 'lib/pathway.rb', line 102 def result_key @result_key end |
Instance Method Details
#call(ctx) ⇒ Object
114 |
# File 'lib/pathway.rb', line 114 def call(ctx, ...) = new(ctx).call(...) |
#inherited(subclass) ⇒ Object
116 117 118 119 |
# File 'lib/pathway.rb', line 116 def inherited(subclass) super subclass.result_key = result_key end |
#process(&steps) ⇒ Object
106 107 108 109 110 111 112 |
# File 'lib/pathway.rb', line 106 def process(&steps) define_method(:call) do |input| _dsl_for(input:) .run(&steps) .then(&:result) end end |