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.
78 79 80 |
# File 'lib/pathway.rb', line 78 def result_key @result_key end |
Instance Method Details
#inherited(subclass) ⇒ Object
89 90 91 92 |
# File 'lib/pathway.rb', line 89 def inherited(subclass) super subclass.result_key = result_key end |
#process(&bl) ⇒ Object
80 81 82 83 84 85 |
# File 'lib/pathway.rb', line 80 def process(&bl) dsl = self::DSL define_method(:call) do |input| dsl.new(self, input).run(&bl).then(&:result) end end |