Class: Puppet::Pops::Model::QualifiedReference
Instance Attribute Summary collapse
Attributes inherited from Positioned
#length, #locator, #offset
Attributes inherited from PopsObject
#hash
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Positioned
#file, #line, #pos
Methods inherited from PopsObject
#_pcore_all_contents, #_pcore_contents, #to_s
#_pcore_all_contents, #_pcore_contents, #_pcore_type, #to_s
Constructor Details
#initialize(locator, offset, length, cased_value) ⇒ QualifiedReference
Returns a new instance of QualifiedReference.
3710
3711
3712
3713
3714
|
# File 'lib/puppet/pops/model/ast.rb', line 3710
def initialize(locator, offset, length, cased_value)
super(locator, offset, length)
@hash = @hash ^ cased_value.hash
@cased_value = cased_value
end
|
Instance Attribute Details
#cased_value ⇒ Object
3704
3705
3706
|
# File 'lib/puppet/pops/model/ast.rb', line 3704
def cased_value
@cased_value
end
|
Class Method Details
.create(locator, offset, length, cased_value) ⇒ Object
3694
3695
3696
3697
3698
3699
3700
3701
3702
|
# File 'lib/puppet/pops/model/ast.rb', line 3694
def self.create(locator, offset, length, cased_value)
ta = Types::TypeAsserter
attrs = _pcore_type.attributes(true)
ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
ta.assert_instance_of('Puppet::AST::QualifiedReference[cased_value]', attrs['cased_value'].type, cased_value)
new(locator, offset, length, cased_value)
end
|
.from_asserted_hash(init_hash) ⇒ Object
3686
3687
3688
3689
3690
3691
3692
|
# File 'lib/puppet/pops/model/ast.rb', line 3686
def self.from_asserted_hash(init_hash)
new(
init_hash['locator'],
init_hash['offset'],
init_hash['length'],
init_hash['cased_value'])
end
|
.from_hash(init_hash) ⇒ Object
3682
3683
3684
|
# File 'lib/puppet/pops/model/ast.rb', line 3682
def self.from_hash(init_hash)
from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::QualifiedReference initializer', _pcore_type.init_hash_type, init_hash))
end
|
Instance Method Details
#_pcore_init_hash ⇒ Object
3716
3717
3718
3719
3720
|
# File 'lib/puppet/pops/model/ast.rb', line 3716
def _pcore_init_hash
result = super
result['cased_value'] = @cased_value
result
end
|
#eql?(o) ⇒ Boolean
Also known as:
==
3722
3723
3724
3725
|
# File 'lib/puppet/pops/model/ast.rb', line 3722
def eql?(o)
super &&
@cased_value.eql?(o.cased_value)
end
|
3706
3707
3708
|
# File 'lib/puppet/pops/model/ast.rb', line 3706
def value
@cased_value.downcase
end
|