class Puppet::Pops::Model::ReservedWord

Attributes

future[R]
word[R]

Public Class Methods

_pcore_type() click to toggle source
     # File lib/puppet/pops/model/ast.rb
3605 def self._pcore_type
3606   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::ReservedWord', {
3607     'parent' => LiteralValue._pcore_type,
3608     'attributes' => {
3609       'word' => Types::PStringType::DEFAULT,
3610       'future' => {
3611         'type' => Types::POptionalType.new(Types::PBooleanType::DEFAULT),
3612         'value' => nil
3613       }
3614     }
3615   })
3616 end
create(locator, offset, length, word, future = nil) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3631 def self.create(locator, offset, length, word, future = nil)
3632   ta = Types::TypeAsserter
3633   attrs = _pcore_type.attributes(true)
3634   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
3635   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
3636   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
3637   ta.assert_instance_of('Puppet::AST::ReservedWord[word]', attrs['word'].type, word)
3638   ta.assert_instance_of('Puppet::AST::ReservedWord[future]', attrs['future'].type, future)
3639   new(locator, offset, length, word, future)
3640 end
from_asserted_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3622 def self.from_asserted_hash(init_hash)
3623   new(
3624     init_hash['locator'],
3625     init_hash['offset'],
3626     init_hash['length'],
3627     init_hash['word'],
3628     init_hash['future'])
3629 end
from_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3618 def self.from_hash(init_hash)
3619   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::ReservedWord initializer', _pcore_type.init_hash_type, init_hash))
3620 end
new(locator, offset, length, word, future = nil) click to toggle source
Calls superclass method Puppet::Pops::Model::Positioned::new
     # File lib/puppet/pops/model/ast.rb
3645 def initialize(locator, offset, length, word, future = nil)
3646   super(locator, offset, length)
3647   @hash = @hash ^ word.hash ^ future.hash
3648   @word = word
3649   @future = future
3650 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
3652 def _pcore_init_hash
3653   result = super
3654   result['word'] = @word
3655   result['future'] = @future unless @future == nil
3656   result
3657 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
     # File lib/puppet/pops/model/ast.rb
3659 def eql?(o)
3660   super &&
3661   @word.eql?(o.word) &&
3662   @future.eql?(o.future)
3663 end
Also aliased as: ==