class Puppet::Pops::Model::LiteralString

Attributes

value[R]

Public Class Methods

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