class Puppet::Pops::Model::LiteralFloat

Attributes

value[R]

Public Class Methods

_pcore_type() click to toggle source
     # File lib/puppet/pops/model/ast.rb
3340 def self._pcore_type
3341   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::LiteralFloat', {
3342     'parent' => LiteralNumber._pcore_type,
3343     'attributes' => {
3344       'value' => Types::PFloatType::DEFAULT
3345     }
3346   })
3347 end
create(locator, offset, length, value) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3361 def self.create(locator, offset, length, value)
3362   ta = Types::TypeAsserter
3363   attrs = _pcore_type.attributes(true)
3364   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
3365   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
3366   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
3367   ta.assert_instance_of('Puppet::AST::LiteralFloat[value]', attrs['value'].type, value)
3368   new(locator, offset, length, value)
3369 end
from_asserted_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3353 def self.from_asserted_hash(init_hash)
3354   new(
3355     init_hash['locator'],
3356     init_hash['offset'],
3357     init_hash['length'],
3358     init_hash['value'])
3359 end
from_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3349 def self.from_hash(init_hash)
3350   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::LiteralFloat initializer', _pcore_type.init_hash_type, init_hash))
3351 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
3373 def initialize(locator, offset, length, value)
3374   super(locator, offset, length)
3375   @hash = @hash ^ value.hash
3376   @value = value
3377 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
3379 def _pcore_init_hash
3380   result = super
3381   result['value'] = @value
3382   result
3383 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
     # File lib/puppet/pops/model/ast.rb
3385 def eql?(o)
3386   super &&
3387   @value.eql?(o.value)
3388 end
Also aliased as: ==