Class: Puppet::Pops::Model::QualifiedName
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, value) ⇒ QualifiedName
Returns a new instance of QualifiedName.
3776
3777
3778
3779
3780
|
# File 'lib/puppet/pops/model/ast.rb', line 3776
def initialize(locator, offset, length, value)
super(locator, offset, length)
@hash = @hash ^ value.hash
@value = value
end
|
Instance Attribute Details
3774
3775
3776
|
# File 'lib/puppet/pops/model/ast.rb', line 3774
def value
@value
end
|
Class Method Details
.create(locator, offset, length, value) ⇒ Object
3764
3765
3766
3767
3768
3769
3770
3771
3772
|
# File 'lib/puppet/pops/model/ast.rb', line 3764
def self.create(locator, offset, length, 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::QualifiedName[value]', attrs['value'].type, value)
new(locator, offset, length, value)
end
|
.from_asserted_hash(init_hash) ⇒ Object
3756
3757
3758
3759
3760
3761
3762
|
# File 'lib/puppet/pops/model/ast.rb', line 3756
def self.from_asserted_hash(init_hash)
new(
init_hash['locator'],
init_hash['offset'],
init_hash['length'],
init_hash['value'])
end
|
.from_hash(init_hash) ⇒ Object
3752
3753
3754
|
# File 'lib/puppet/pops/model/ast.rb', line 3752
def self.from_hash(init_hash)
from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::QualifiedName initializer', _pcore_type.init_hash_type, init_hash))
end
|
Instance Method Details
#_pcore_init_hash ⇒ Object
3782
3783
3784
3785
3786
|
# File 'lib/puppet/pops/model/ast.rb', line 3782
def _pcore_init_hash
result = super
result['value'] = @value
result
end
|
#eql?(o) ⇒ Boolean
Also known as:
==
3788
3789
3790
3791
|
# File 'lib/puppet/pops/model/ast.rb', line 3788
def eql?(o)
super &&
@value.eql?(o.value)
end
|