lib/eco-rake/options/default_lookup.rb in eco-rake-0.2.6 vs lib/eco-rake/options/default_lookup.rb in eco-rake-0.2.7

- old
+ new

@@ -1,27 +1,43 @@ class EcoRake module Options module DefaultLookup class << self def included(base) - super(base) + super base.extend EcoRake::Base::MethodHelpers base.extend ClassMethods end end module ClassMethods # @note it extends `RakeCommander::Options` # 1. default can be re-configured via callback or constant # [ @see RakeCommander::Options::option ] def option(*args, default_lookup: :not_used, **kargs, &block) - kargs.merge!(default: symbol_resolver(default_lookup, as: %i[method const])) unless default_lookup == :not_used + unless default_lookup == :not_used + kargs.merge!( + default: symbol_resolver( + default_lookup, + as: %i[method const] + ) + ) + end + super(*args, **kargs, &block) end # [ @see RakeCommander::Options::option_reopen ] def option_reopen(*args, default_lookup: :not_used, **kargs, &block) - kargs.merge!(default: symbol_resolver(default_lookup, as: %i[method const])) unless default_lookup == :not_used + unless default_lookup == :not_used + kargs.merge!( + default: symbol_resolver( + default_lookup, + as: %i[method const] + ) + ) + end + super(*args, **kargs, &block) end end end end