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