Class: HammerCLI::Apipie::OptionDefinition
- Inherits:
-
Options::OptionDefinition
- Object
- Options::OptionDefinition
- HammerCLI::Apipie::OptionDefinition
- Defined in:
- lib/hammer_cli/apipie/option_definition.rb
Instance Attribute Summary collapse
-
#aliased_resource ⇒ Object
Returns the value of attribute aliased_resource.
-
#referenced_resource ⇒ Object
Returns the value of attribute referenced_resource.
Instance Method Summary collapse
-
#initialize(switches, type, description, options = {}) ⇒ OptionDefinition
constructor
A new instance of OptionDefinition.
Constructor Details
#initialize(switches, type, description, options = {}) ⇒ OptionDefinition
Returns a new instance of OptionDefinition.
7 8 9 10 11 12 13 14 |
# File 'lib/hammer_cli/apipie/option_definition.rb', line 7 def initialize(switches, type, description, = {}) @referenced_resource = [:referenced_resource].to_s if [:referenced_resource] @aliased_resource = [:aliased_resource].to_s if [:aliased_resource] super # Apipie currently sends descriptions as escaped HTML once this is changed this should be removed. # See #15198 on Redmine. @description = CGI::unescapeHTML(description) end |
Instance Attribute Details
#aliased_resource ⇒ Object
Returns the value of attribute aliased_resource.
5 6 7 |
# File 'lib/hammer_cli/apipie/option_definition.rb', line 5 def aliased_resource @aliased_resource end |
#referenced_resource ⇒ Object
Returns the value of attribute referenced_resource.
5 6 7 |
# File 'lib/hammer_cli/apipie/option_definition.rb', line 5 def referenced_resource @referenced_resource end |