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