Class: HammerCLI::Options::Sources::SavedDefaults
- Inherits:
-
Base
- Object
- OptionProcessor
- Base
- HammerCLI::Options::Sources::SavedDefaults
- Defined in:
- lib/hammer_cli/options/sources/saved_defaults.rb
Instance Method Summary collapse
- #get_options(defined_options, result) ⇒ Object
-
#initialize(defaults, logger) ⇒ SavedDefaults
constructor
A new instance of SavedDefaults.
Methods inherited from Base
Methods inherited from OptionProcessor
Constructor Details
#initialize(defaults, logger) ⇒ SavedDefaults
Returns a new instance of SavedDefaults.
7 8 9 10 |
# File 'lib/hammer_cli/options/sources/saved_defaults.rb', line 7 def initialize(defaults, logger) @defaults = defaults @logger = logger end |
Instance Method Details
#get_options(defined_options, result) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/hammer_cli/options/sources/saved_defaults.rb', line 12 def (, result) .each do |opt| result[opt.attribute_name] = add_custom_defaults(opt) if result[opt.attribute_name].nil? end if @defaults result end |