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.
      84 85 86 87 88 89 90 91 92 93 94 95 96  | 
    
      # File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 84 def initialize(parameter) @name = parameter.name # Take the exact text for the type expression if parameter.type_expr adapter = ::Puppet::Pops::Adapters::SourcePosAdapter.adapt(parameter.type_expr) @type = adapter.extract_text end # Take the exact text for the default value expression if parameter.value adapter = ::Puppet::Pops::Adapters::SourcePosAdapter.adapt(parameter.value) @value = adapter.extract_text end end  | 
  
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
      78 79 80  | 
    
      # File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 78 def name @name end  | 
  
#type ⇒ Object (readonly)
Returns the value of attribute type.
      79 80 81  | 
    
      # File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 79 def type @type end  | 
  
#value ⇒ Object (readonly)
Returns the value of attribute value.
      80 81 82  | 
    
      # File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 80 def value @value end  |