Class: Puppet::Pops::Model::NamedAccessExpression

Inherits:
BinaryExpression show all
Defined in:
lib/puppet/pops/model/ast.rb

Instance Attribute Summary

Attributes inherited from BinaryExpression

#left_expr, #right_expr

Attributes inherited from Positioned

#length, #locator, #offset

Attributes inherited from PopsObject

#hash

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BinaryExpression

#_pcore_init_hash, create, #eql?, from_asserted_hash, from_hash, #initialize

Methods inherited from Positioned

#_pcore_init_hash, create, #file, from_asserted_hash, from_hash, #initialize, #line, #pos

Methods inherited from PopsObject

#_pcore_init_hash, create, #eql?, from_asserted_hash, from_hash, #initialize, #to_s

Methods included from Types::PuppetObject

#_pcore_init_hash, #_pcore_type, #to_s

Constructor Details

This class inherits a constructor from Puppet::Pops::Model::BinaryExpression

Class Method Details

._pcore_typeObject



4524
4525
4526
4527
4528
4529
4530
# File 'lib/puppet/pops/model/ast.rb', line 4524

def self._pcore_type
  @_pcore_type ||=
    Types::PObjectType
      .new('Puppet::AST::NamedAccessExpression', {
             'parent' => BinaryExpression._pcore_type
           })
end

Instance Method Details

#_pcore_all_contents(path, &block) ⇒ Object



4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
# File 'lib/puppet/pops/model/ast.rb', line 4537

def _pcore_all_contents(path, &block)
  path << self
  unless @left_expr.nil?
    block.call(@left_expr, path)
    @left_expr._pcore_all_contents(path, &block)
  end
  unless @right_expr.nil?
    block.call(@right_expr, path)
    @right_expr._pcore_all_contents(path, &block)
  end
  path.pop
end

#_pcore_contents {|@left_expr| ... } ⇒ Object

Yields:



4532
4533
4534
4535
# File 'lib/puppet/pops/model/ast.rb', line 4532

def _pcore_contents
  yield(@left_expr) unless @left_expr.nil?
  yield(@right_expr) unless @right_expr.nil?
end