Module: ForemanMaintain::Cli::TransformClampOptions::OptionsToParams
- Defined in:
- lib/foreman_maintain/cli/transform_clamp_options.rb
Instance Method Summary collapse
Instance Method Details
#get_params_for(definition) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/foreman_maintain/cli/transform_clamp_options.rb', line 17 def get_params_for(definition) all_params = params = {} definition.params.each_value do |param| params[param.name] = all_params[param.name] end params end |
#options_to_params ⇒ Object
10 11 12 13 14 15 |
# File 'lib/foreman_maintain/cli/transform_clamp_options.rb', line 10 def @params ||= self.class..inject({}) do |par, option| par[option_sym(option)] = send(option.read_method) if (option) par end end |