Module: EcoRake::Options::Forwarding::ClassMethods

Defined in:
lib/eco-rake/options/forwarding.rb

Instance Method Summary collapse

Instance Method Details

#option_forwarding(**rules) ⇒ Object

Declare the forwarding rules for options.

Parameters:

  • rules (Hash)

    where keys are option names or shorts and values the rules.



24
25
26
27
28
# File 'lib/eco-rake/options/forwarding.rb', line 24

def option_forwarding(**rules)
  rules.each do |sym, rule|
    options_proxy.add(sym, rule, override: true)
  end
end

#options_proxyObject

Service class to forward options.



18
19
20
# File 'lib/eco-rake/options/forwarding.rb', line 18

def options_proxy
  @options_proxy ||= EcoRake::Options::Forwarding::Proxy.new(self)
end