class Puppet::Pops::Model::AttributesOperation
Attributes
expr[R]
Public Class Methods
_pcore_type()
click to toggle source
# File lib/puppet/pops/model/ast.rb 1589 def self._pcore_type 1590 @_pcore_type ||= Types::PObjectType.new('Puppet::AST::AttributesOperation', { 1591 'parent' => AbstractAttributeOperation._pcore_type, 1592 'attributes' => { 1593 'expr' => Expression._pcore_type 1594 } 1595 }) 1596 end
create(locator, offset, length, expr)
click to toggle source
# File lib/puppet/pops/model/ast.rb 1610 def self.create(locator, offset, length, expr) 1611 ta = Types::TypeAsserter 1612 attrs = _pcore_type.attributes(true) 1613 ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator) 1614 ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset) 1615 ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length) 1616 ta.assert_instance_of('Puppet::AST::AttributesOperation[expr]', attrs['expr'].type, expr) 1617 new(locator, offset, length, expr) 1618 end
from_asserted_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 1602 def self.from_asserted_hash(init_hash) 1603 new( 1604 init_hash['locator'], 1605 init_hash['offset'], 1606 init_hash['length'], 1607 init_hash['expr']) 1608 end
from_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 1598 def self.from_hash(init_hash) 1599 from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::AttributesOperation initializer', _pcore_type.init_hash_type, init_hash)) 1600 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 1622 def initialize(locator, offset, length, expr) 1623 super(locator, offset, length) 1624 @hash = @hash ^ expr.hash 1625 @expr = expr 1626 end
Public Instance Methods
_pcore_all_contents(path, &block)
click to toggle source
# File lib/puppet/pops/model/ast.rb 1638 def _pcore_all_contents(path, &block) 1639 path << self 1640 unless @expr.nil? 1641 block.call(@expr, path) 1642 @expr._pcore_all_contents(path, &block) 1643 end 1644 path.pop 1645 end
_pcore_contents() { |expr| ... }
click to toggle source
# File lib/puppet/pops/model/ast.rb 1634 def _pcore_contents 1635 yield(@expr) unless @expr.nil? 1636 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 1628 def _pcore_init_hash 1629 result = super 1630 result['expr'] = @expr 1631 result 1632 end
eql?(o)
click to toggle source
Calls superclass method
Puppet::Pops::Model::PopsObject#eql?
# File lib/puppet/pops/model/ast.rb 1647 def eql?(o) 1648 super && 1649 @expr.eql?(o.expr) 1650 end
Also aliased as: ==