class Puppet::Pops::Model::QRefDefinition

Attributes

name[R]

Public Class Methods

_pcore_type() click to toggle source
     # File lib/puppet/pops/model/ast.rb
2060 def self._pcore_type
2061   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::QRefDefinition', {
2062     'parent' => Definition._pcore_type,
2063     'attributes' => {
2064       'name' => Types::PStringType::DEFAULT
2065     }
2066   })
2067 end
create(locator, offset, length, name) click to toggle source
     # File lib/puppet/pops/model/ast.rb
2081 def self.create(locator, offset, length, name)
2082   ta = Types::TypeAsserter
2083   attrs = _pcore_type.attributes(true)
2084   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
2085   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
2086   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
2087   ta.assert_instance_of('Puppet::AST::QRefDefinition[name]', attrs['name'].type, name)
2088   new(locator, offset, length, name)
2089 end
from_asserted_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
2073 def self.from_asserted_hash(init_hash)
2074   new(
2075     init_hash['locator'],
2076     init_hash['offset'],
2077     init_hash['length'],
2078     init_hash['name'])
2079 end
from_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
2069 def self.from_hash(init_hash)
2070   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::QRefDefinition initializer', _pcore_type.init_hash_type, init_hash))
2071 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
2093 def initialize(locator, offset, length, name)
2094   super(locator, offset, length)
2095   @hash = @hash ^ name.hash
2096   @name = name
2097 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
2099 def _pcore_init_hash
2100   result = super
2101   result['name'] = @name
2102   result
2103 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
     # File lib/puppet/pops/model/ast.rb
2105 def eql?(o)
2106   super &&
2107   @name.eql?(o.name)
2108 end
Also aliased as: ==