Module: EcoRake::Options::DefaultLookup::ClassMethods
- Defined in:
- lib/eco-rake/options/default_lookup.rb
Instance Method Summary collapse
-
#option(*args, default_lookup: :not_used, **kargs, &block) ⇒ Object
[ @see RakeCommander::Options::option ].
-
#option_reopen(*args, default_lookup: :not_used, **kargs, &block) ⇒ Object
[ @see RakeCommander::Options::option_reopen ].
Instance Method Details
#option(*args, default_lookup: :not_used, **kargs, &block) ⇒ Object
Note:
it extends RakeCommander::Options
- default can be re-configured via callback or constant
[ @see RakeCommander::Options::option ]
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/eco-rake/options/default_lookup.rb', line 16 def option(*args, default_lookup: :not_used, **kargs, &block) unless default_lookup == :not_used kargs.merge!( default: symbol_resolver( default_lookup, as: %i[method const] ) ) end super(*args, **kargs, &block) end |
#option_reopen(*args, default_lookup: :not_used, **kargs, &block) ⇒ Object
[ @see RakeCommander::Options::option_reopen ]
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/eco-rake/options/default_lookup.rb', line 30 def option_reopen(*args, default_lookup: :not_used, **kargs, &block) unless default_lookup == :not_used kargs.merge!( default: symbol_resolver( default_lookup, as: %i[method const] ) ) end super(*args, **kargs, &block) end |