class Puppet::Pops::Model::AttributesOperation

Attributes

expr[R]

Public Class Methods

_pcore_type() click to toggle source
     # File lib/puppet/pops/model/ast.rb
1590 def self._pcore_type
1591   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::AttributesOperation', {
1592     'parent' => AbstractAttributeOperation._pcore_type,
1593     'attributes' => {
1594       'expr' => Expression._pcore_type
1595     }
1596   })
1597 end
create(locator, offset, length, expr) click to toggle source
     # File lib/puppet/pops/model/ast.rb
1611 def self.create(locator, offset, length, expr)
1612   ta = Types::TypeAsserter
1613   attrs = _pcore_type.attributes(true)
1614   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
1615   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
1616   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
1617   ta.assert_instance_of('Puppet::AST::AttributesOperation[expr]', attrs['expr'].type, expr)
1618   new(locator, offset, length, expr)
1619 end
from_asserted_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
1603 def self.from_asserted_hash(init_hash)
1604   new(
1605     init_hash['locator'],
1606     init_hash['offset'],
1607     init_hash['length'],
1608     init_hash['expr'])
1609 end
from_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
1599 def self.from_hash(init_hash)
1600   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::AttributesOperation initializer', _pcore_type.init_hash_type, init_hash))
1601 end
new(locator, offset, length, expr) click to toggle source
Calls superclass method Puppet::Pops::Model::Positioned::new
     # File lib/puppet/pops/model/ast.rb
1623 def initialize(locator, offset, length, expr)
1624   super(locator, offset, length)
1625   @hash = @hash ^ expr.hash
1626   @expr = expr
1627 end

Public Instance Methods

==(o)
Alias for: eql?
_pcore_all_contents(path, &block) click to toggle source
     # File lib/puppet/pops/model/ast.rb
1639 def _pcore_all_contents(path, &block)
1640   path << self
1641   unless @expr.nil?
1642     block.call(@expr, path)
1643     @expr._pcore_all_contents(path, &block)
1644   end
1645   path.pop
1646 end
_pcore_contents() { |expr| ... } click to toggle source
     # File lib/puppet/pops/model/ast.rb
1635 def _pcore_contents
1636   yield(@expr) unless @expr.nil?
1637 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
1629 def _pcore_init_hash
1630   result = super
1631   result['expr'] = @expr
1632   result
1633 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
     # File lib/puppet/pops/model/ast.rb
1648 def eql?(o)
1649   super &&
1650   @expr.eql?(o.expr)
1651 end
Also aliased as: ==