Class: HammerCLIForeman::Searchable
- Inherits:
-
Object
- Object
- HammerCLIForeman::Searchable
- Defined in:
- lib/hammer_cli_foreman/id_resolver.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #editable? ⇒ Boolean
-
#initialize(name, description, options = {}) ⇒ Searchable
constructor
A new instance of Searchable.
- #plural_name ⇒ Object
Constructor Details
#initialize(name, description, options = {}) ⇒ Searchable
Returns a new instance of Searchable.
6 7 8 9 10 |
# File 'lib/hammer_cli_foreman/id_resolver.rb', line 6 def initialize(name, description, ={}) @name = name @description = description @editable = [:editable].nil? ? true : [:editable] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/hammer_cli_foreman/id_resolver.rb', line 4 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/hammer_cli_foreman/id_resolver.rb', line 4 def name @name end |
Instance Method Details
#editable? ⇒ Boolean
16 17 18 |
# File 'lib/hammer_cli_foreman/id_resolver.rb', line 16 def editable? @editable end |
#plural_name ⇒ Object
12 13 14 |
# File 'lib/hammer_cli_foreman/id_resolver.rb', line 12 def plural_name ApipieBindings::Inflector.pluralize(@name) end |