Class: FlagTemplateParameter
- Inherits:
-
Object
- Object
- FlagTemplateParameter
- Defined in:
- lib/ccios/flag_template_parameter.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#short_name ⇒ Object
readonly
Returns the value of attribute short_name.
-
#template_variable_name ⇒ Object
readonly
Returns the value of attribute template_variable_name.
Instance Method Summary collapse
-
#initialize(parameter_template_definition_hash) ⇒ FlagTemplateParameter
constructor
A new instance of FlagTemplateParameter.
- #provided_context_keys ⇒ Object
Constructor Details
#initialize(parameter_template_definition_hash) ⇒ FlagTemplateParameter
Returns a new instance of FlagTemplateParameter.
4 5 6 7 8 9 10 11 12 |
# File 'lib/ccios/flag_template_parameter.rb', line 4 def initialize(parameter_template_definition_hash) @name = parameter_template_definition_hash["flag"] @short_name = parameter_template_definition_hash["short_name"] @description = parameter_template_definition_hash["description"] || "" @template_variable_name = parameter_template_definition_hash["template_variable_name"] || @name raise "Missing flag name" if @name.nil? || @name.empty? raise "Invalid flag template_variable_name for #{@name}" if @template_variable_name.nil? || template_variable_name.empty? end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
2 3 4 |
# File 'lib/ccios/flag_template_parameter.rb', line 2 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/ccios/flag_template_parameter.rb', line 2 def name @name end |
#short_name ⇒ Object (readonly)
Returns the value of attribute short_name.
2 3 4 |
# File 'lib/ccios/flag_template_parameter.rb', line 2 def short_name @short_name end |
#template_variable_name ⇒ Object (readonly)
Returns the value of attribute template_variable_name.
2 3 4 |
# File 'lib/ccios/flag_template_parameter.rb', line 2 def template_variable_name @template_variable_name end |
Instance Method Details
#provided_context_keys ⇒ Object
14 15 16 |
# File 'lib/ccios/flag_template_parameter.rb', line 14 def provided_context_keys [@template_variable_name] end |