class Puppet::Pops::Model::LiteralBoolean

Attributes

value[R]

Public Class Methods

_pcore_type() click to toggle source
     # File lib/puppet/pops/model/ast.rb
3410 def self._pcore_type
3411   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::LiteralBoolean', {
3412     'parent' => LiteralValue._pcore_type,
3413     'attributes' => {
3414       'value' => Types::PBooleanType::DEFAULT
3415     }
3416   })
3417 end
create(locator, offset, length, value) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3431 def self.create(locator, offset, length, value)
3432   ta = Types::TypeAsserter
3433   attrs = _pcore_type.attributes(true)
3434   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
3435   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
3436   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
3437   ta.assert_instance_of('Puppet::AST::LiteralBoolean[value]', attrs['value'].type, value)
3438   new(locator, offset, length, value)
3439 end
from_asserted_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3423 def self.from_asserted_hash(init_hash)
3424   new(
3425     init_hash['locator'],
3426     init_hash['offset'],
3427     init_hash['length'],
3428     init_hash['value'])
3429 end
from_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3419 def self.from_hash(init_hash)
3420   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::LiteralBoolean initializer', _pcore_type.init_hash_type, init_hash))
3421 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
3443 def initialize(locator, offset, length, value)
3444   super(locator, offset, length)
3445   @hash = @hash ^ value.hash
3446   @value = value
3447 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
3449 def _pcore_init_hash
3450   result = super
3451   result['value'] = @value
3452   result
3453 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
     # File lib/puppet/pops/model/ast.rb
3455 def eql?(o)
3456   super &&
3457   @value.eql?(o.value)
3458 end
Also aliased as: ==