class Puppet::Pops::Model::QRefDefinition

Attributes

name[R]

Public Class Methods

_pcore_type() click to toggle source
     # File lib/puppet/pops/model/ast.rb
2059 def self._pcore_type
2060   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::QRefDefinition', {
2061     'parent' => Definition._pcore_type,
2062     'attributes' => {
2063       'name' => Types::PStringType::DEFAULT
2064     }
2065   })
2066 end
create(locator, offset, length, name) click to toggle source
     # File lib/puppet/pops/model/ast.rb
2080 def self.create(locator, offset, length, name)
2081   ta = Types::TypeAsserter
2082   attrs = _pcore_type.attributes(true)
2083   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
2084   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
2085   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
2086   ta.assert_instance_of('Puppet::AST::QRefDefinition[name]', attrs['name'].type, name)
2087   new(locator, offset, length, name)
2088 end
from_asserted_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
2072 def self.from_asserted_hash(init_hash)
2073   new(
2074     init_hash['locator'],
2075     init_hash['offset'],
2076     init_hash['length'],
2077     init_hash['name'])
2078 end
from_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
2068 def self.from_hash(init_hash)
2069   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::QRefDefinition initializer', _pcore_type.init_hash_type, init_hash))
2070 end
new(locator, offset, length, name) click to toggle source
Calls superclass method Puppet::Pops::Model::Positioned::new
     # File lib/puppet/pops/model/ast.rb
2092 def initialize(locator, offset, length, name)
2093   super(locator, offset, length)
2094   @hash = @hash ^ name.hash
2095   @name = name
2096 end

Public Instance Methods

==(o)
Alias for: eql?
_pcore_init_hash() click to toggle source
Calls superclass method Puppet::Pops::Model::Positioned#_pcore_init_hash
     # File lib/puppet/pops/model/ast.rb
2098 def _pcore_init_hash
2099   result = super
2100   result['name'] = @name
2101   result
2102 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
     # File lib/puppet/pops/model/ast.rb
2104 def eql?(o)
2105   super &&
2106   @name.eql?(o.name)
2107 end
Also aliased as: ==