class Puppet::Pops::Model::ConcatenatedString
Attributes
segments[R]
Public Class Methods
_pcore_type()
click to toggle source
# File lib/puppet/pops/model/ast.rb 3484 def self._pcore_type 3485 @_pcore_type ||= Types::PObjectType.new('Puppet::AST::ConcatenatedString', { 3486 'parent' => Expression._pcore_type, 3487 'attributes' => { 3488 'segments' => { 3489 'type' => Types::PArrayType.new(Expression._pcore_type), 3490 'value' => [] 3491 } 3492 } 3493 }) 3494 end
create(locator, offset, length, segments = _pcore_type['segments'].value)
click to toggle source
# File lib/puppet/pops/model/ast.rb 3508 def self.create(locator, offset, length, segments = _pcore_type['segments'].value) 3509 ta = Types::TypeAsserter 3510 attrs = _pcore_type.attributes(true) 3511 ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator) 3512 ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset) 3513 ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length) 3514 ta.assert_instance_of('Puppet::AST::ConcatenatedString[segments]', attrs['segments'].type, segments) 3515 new(locator, offset, length, segments) 3516 end
from_asserted_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 3500 def self.from_asserted_hash(init_hash) 3501 new( 3502 init_hash['locator'], 3503 init_hash['offset'], 3504 init_hash['length'], 3505 init_hash.fetch('segments') { _pcore_type['segments'].value }) 3506 end
from_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 3496 def self.from_hash(init_hash) 3497 from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::ConcatenatedString initializer', _pcore_type.init_hash_type, init_hash)) 3498 end
new(locator, offset, length, segments = _pcore_type['segments'].value)
click to toggle source
Calls superclass method
Puppet::Pops::Model::Positioned::new
# File lib/puppet/pops/model/ast.rb 3520 def initialize(locator, offset, length, segments = _pcore_type['segments'].value) 3521 super(locator, offset, length) 3522 @hash = @hash ^ segments.hash 3523 @segments = segments 3524 end
Public Instance Methods
_pcore_all_contents(path, &block)
click to toggle source
# File lib/puppet/pops/model/ast.rb 3536 def _pcore_all_contents(path, &block) 3537 path << self 3538 @segments.each do |value| 3539 block.call(value, path) 3540 value._pcore_all_contents(path, &block) 3541 end 3542 path.pop 3543 end
_pcore_contents() { |value| ... }
click to toggle source
# File lib/puppet/pops/model/ast.rb 3532 def _pcore_contents 3533 @segments.each { |value| yield(value) } 3534 end
_pcore_init_hash()
click to toggle source
Calls superclass method
Puppet::Pops::Model::Positioned#_pcore_init_hash
# File lib/puppet/pops/model/ast.rb 3526 def _pcore_init_hash 3527 result = super 3528 result['segments'] = @segments unless _pcore_type['segments'].default_value?(@segments) 3529 result 3530 end
eql?(o)
click to toggle source
Calls superclass method
Puppet::Pops::Model::PopsObject#eql?
# File lib/puppet/pops/model/ast.rb 3545 def eql?(o) 3546 super && 3547 @segments.eql?(o.segments) 3548 end
Also aliased as: ==