Class: PuppetStrings::Yard::Parsers::Puppet::ParameterizedStatement::Parameter
- Inherits:
-
Object
- Object
- PuppetStrings::Yard::Parsers::Puppet::ParameterizedStatement::Parameter
- Defined in:
- lib/puppet-strings/yard/parsers/puppet/statement.rb
Overview
Implements a parameter for a parameterized statement.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(parameter) ⇒ Parameter
constructor
Initializes the parameter.
Constructor Details
#initialize(parameter) ⇒ Parameter
Initializes the parameter.
78 79 80 81 82 83 84 85 86 |
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 78 def initialize(parameter) @name = parameter.name # Take the exact text for the type expression @type = PuppetStrings::Yard::Util.ast_to_text(parameter.type_expr) if parameter.type_expr # Take the exact text for the default value expression return unless parameter.value @value = PuppetStrings::Yard::Util.ast_to_text(parameter.value) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
74 75 76 |
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 74 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
74 75 76 |
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 74 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
74 75 76 |
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 74 def value @value end |