class Puppet::Pops::Model::LiteralList

Attributes

values[R]

Public Class Methods

_pcore_type() click to toggle source
    # File lib/puppet/pops/model/ast.rb
935 def self._pcore_type
936   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::LiteralList', {
937     'parent' => Expression._pcore_type,
938     'attributes' => {
939       'values' => {
940         'type' => Types::PArrayType.new(Expression._pcore_type),
941         'value' => []
942       }
943     }
944   })
945 end
create(locator, offset, length, values = _pcore_type['values'].value) click to toggle source
    # File lib/puppet/pops/model/ast.rb
959 def self.create(locator, offset, length, values = _pcore_type['values'].value)
960   ta = Types::TypeAsserter
961   attrs = _pcore_type.attributes(true)
962   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
963   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
964   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
965   ta.assert_instance_of('Puppet::AST::LiteralList[values]', attrs['values'].type, values)
966   new(locator, offset, length, values)
967 end
from_asserted_hash(init_hash) click to toggle source
    # File lib/puppet/pops/model/ast.rb
951 def self.from_asserted_hash(init_hash)
952   new(
953     init_hash['locator'],
954     init_hash['offset'],
955     init_hash['length'],
956     init_hash.fetch('values') { _pcore_type['values'].value })
957 end
from_hash(init_hash) click to toggle source
    # File lib/puppet/pops/model/ast.rb
947 def self.from_hash(init_hash)
948   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::LiteralList initializer', _pcore_type.init_hash_type, init_hash))
949 end
new(locator, offset, length, values = _pcore_type['values'].value) click to toggle source
Calls superclass method Puppet::Pops::Model::Positioned::new
    # File lib/puppet/pops/model/ast.rb
971 def initialize(locator, offset, length, values = _pcore_type['values'].value)
972   super(locator, offset, length)
973   @hash = @hash ^ values.hash
974   @values = values
975 end

Public Instance Methods

==(o)
Alias for: eql?
_pcore_all_contents(path, &block) click to toggle source
    # File lib/puppet/pops/model/ast.rb
987 def _pcore_all_contents(path, &block)
988   path << self
989   @values.each do |value|
990     block.call(value, path)
991     value._pcore_all_contents(path, &block)
992   end
993   path.pop
994 end
_pcore_contents() { |value| ... } click to toggle source
    # File lib/puppet/pops/model/ast.rb
983 def _pcore_contents
984   @values.each { |value| yield(value) }
985 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
977 def _pcore_init_hash
978   result = super
979   result['values'] = @values unless _pcore_type['values'].default_value?(@values)
980   result
981 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
    # File lib/puppet/pops/model/ast.rb
996 def eql?(o)
997   super &&
998   @values.eql?(o.values)
999 end
Also aliased as: ==