Class: HammerCLI::Apipie::OptionDefinition
- Inherits:
-
Options::OptionDefinition
- Object
- Clamp::Option::Definition
- 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.
Attributes inherited from Options::OptionDefinition
#context_target, #deprecated_switches, #family, #value_formatter
Instance Method Summary collapse
-
#initialize(switches, type, description, options = {}) ⇒ OptionDefinition
constructor
A new instance of OptionDefinition.
Methods inherited from Options::OptionDefinition
#child?, #complete, #completion_type, #default_conversion_block, #default_value, #deprecation_message, #description, #extract_value, #format_description, #format_value, #help_lhs, #help_rhs, #nil_subst, #value_description
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 |