class Puppet::Pops::Model::LiteralBoolean

Attributes

value[R]

Public Class Methods

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