Class: HammerCLIForeman::DependentSearchablesOptionBuilder
- Inherits:
-
SearchablesAbstractOptionBuilder
- Object
- HammerCLI::AbstractOptionBuilder
- SearchablesAbstractOptionBuilder
- HammerCLIForeman::DependentSearchablesOptionBuilder
- Defined in:
- lib/hammer_cli_foreman/option_builders.rb
Direct Known Subclasses
DependentSearchablesArrayOptionBuilder, UpdateDependentSearchablesOptionBuilder
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
- #build(builder_params = {}) ⇒ Object
-
#initialize(resource, searchables, options = {}) ⇒ DependentSearchablesOptionBuilder
constructor
A new instance of DependentSearchablesOptionBuilder.
Constructor Details
#initialize(resource, searchables, options = {}) ⇒ DependentSearchablesOptionBuilder
Returns a new instance of DependentSearchablesOptionBuilder.
205 206 207 208 209 |
# File 'lib/hammer_cli_foreman/option_builders.rb', line 205 def initialize(resource, searchables, = {}) @resource = resource @searchables = searchables @context = [:context] || {} end |
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
211 212 213 |
# File 'lib/hammer_cli_foreman/option_builders.rb', line 211 def resource @resource end |
Instance Method Details
#build(builder_params = {}) ⇒ Object
213 214 215 216 217 |
# File 'lib/hammer_cli_foreman/option_builders.rb', line 213 def build(builder_params={}) resource_name_map = builder_params[:resource_mapping] || {} command = builder_params[:command] (@resource, resource_name_map, command) end |