Class: HammerCLI::BaseDefaultsProvider
- Inherits:
-
Object
- Object
- HammerCLI::BaseDefaultsProvider
- Defined in:
- lib/hammer_cli/defaults_commands.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#provider_name ⇒ Object
readonly
Returns the value of attribute provider_name.
-
#supported_defaults ⇒ Object
readonly
Returns the value of attribute supported_defaults.
Instance Method Summary collapse
- #get_defaults ⇒ Object
-
#initialize ⇒ BaseDefaultsProvider
constructor
A new instance of BaseDefaultsProvider.
- #param_supported?(param) ⇒ Boolean
Constructor Details
#initialize ⇒ BaseDefaultsProvider
Returns a new instance of BaseDefaultsProvider.
6 7 8 9 10 |
# File 'lib/hammer_cli/defaults_commands.rb', line 6 def initialize @provider_name = nil @supported_defaults = nil @description = 'Abstract provider' end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/hammer_cli/defaults_commands.rb', line 4 def description @description end |
#provider_name ⇒ Object (readonly)
Returns the value of attribute provider_name.
4 5 6 |
# File 'lib/hammer_cli/defaults_commands.rb', line 4 def provider_name @provider_name end |
#supported_defaults ⇒ Object (readonly)
Returns the value of attribute supported_defaults.
4 5 6 |
# File 'lib/hammer_cli/defaults_commands.rb', line 4 def supported_defaults @supported_defaults end |
Instance Method Details
#get_defaults ⇒ Object
16 17 18 |
# File 'lib/hammer_cli/defaults_commands.rb', line 16 def get_defaults raise NotImplementedError end |
#param_supported?(param) ⇒ Boolean
12 13 14 |
# File 'lib/hammer_cli/defaults_commands.rb', line 12 def param_supported?(param) @supported_defaults.nil? || @supported_defaults.any? {|s| s.to_s == param} end |