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