class Puppet::Pops::Model::LiteralString

Attributes

value[R]

Public Class Methods

_pcore_type() click to toggle source
     # File lib/puppet/pops/model/ast.rb
3216 def self._pcore_type
3217   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::LiteralString', {
3218     'parent' => LiteralValue._pcore_type,
3219     'attributes' => {
3220       'value' => Types::PStringType::DEFAULT
3221     }
3222   })
3223 end
create(locator, offset, length, value) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3237 def self.create(locator, offset, length, value)
3238   ta = Types::TypeAsserter
3239   attrs = _pcore_type.attributes(true)
3240   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
3241   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
3242   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
3243   ta.assert_instance_of('Puppet::AST::LiteralString[value]', attrs['value'].type, value)
3244   new(locator, offset, length, value)
3245 end
from_asserted_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3229 def self.from_asserted_hash(init_hash)
3230   new(
3231     init_hash['locator'],
3232     init_hash['offset'],
3233     init_hash['length'],
3234     init_hash['value'])
3235 end
from_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3225 def self.from_hash(init_hash)
3226   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::LiteralString initializer', _pcore_type.init_hash_type, init_hash))
3227 end
new(locator, offset, length, value) click to toggle source
Calls superclass method Puppet::Pops::Model::Positioned::new
     # File lib/puppet/pops/model/ast.rb
3249 def initialize(locator, offset, length, value)
3250   super(locator, offset, length)
3251   @hash = @hash ^ value.hash
3252   @value = value
3253 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
3255 def _pcore_init_hash
3256   result = super
3257   result['value'] = @value
3258   result
3259 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
     # File lib/puppet/pops/model/ast.rb
3261 def eql?(o)
3262   super &&
3263   @value.eql?(o.value)
3264 end
Also aliased as: ==