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.
100 101 102 |
# File 'lib/pathway.rb', line 100 def result_key @result_key end |
Instance Method Details
#call(ctx) ⇒ Object
112 |
# File 'lib/pathway.rb', line 112 def call(ctx,...) = new(ctx).call(...) |
#inherited(subclass) ⇒ Object
114 115 116 117 |
# File 'lib/pathway.rb', line 114 def inherited(subclass) super subclass.result_key = result_key end |
#process(&steps) ⇒ Object
104 105 106 107 108 109 110 |
# File 'lib/pathway.rb', line 104 def process(&steps) define_method(:call) do |input| _dsl_for(input:) .run(&steps) .then(&:result) end end |