Class: EacCli::Runner::ContextResponders::Parent
- Defined in:
- lib/eac_cli/runner/context_responders/parent.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#call(*args, &block) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/eac_cli/runner/context_responders/parent.rb', line 15 def call(*args, &block) return parent.runner_context.call(method_name, *args, &block) if parent.respond_to?(:runner_context) raise "Parent #{parent} do not respond to .context or .runner_context (Runner: #{runner})" end |
#callable? ⇒ Boolean
7 8 9 10 11 12 13 |
# File 'lib/eac_cli/runner/context_responders/parent.rb', line 7 def callable? parent.if_present(false) do |v| next true if v.respond_to?(method_name) v.if_respond(:runner_context, false) { |w| w.parent_respond_to?(method_name) } end end |