class EcoRake module Options module DefaultLookup class << self def included(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) 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) 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 end