class Puppet::Pops::Model::QueryExpression
Attributes
expr[R]
Public Class Methods
_pcore_type()
click to toggle source
# File lib/puppet/pops/model/ast.rb 1391 def self._pcore_type 1392 @_pcore_type ||= Types::PObjectType.new('Puppet::AST::QueryExpression', { 1393 'parent' => Expression._pcore_type, 1394 'attributes' => { 1395 'expr' => { 1396 'type' => Types::POptionalType.new(Expression._pcore_type), 1397 'value' => nil 1398 } 1399 } 1400 }) 1401 end
create(locator, offset, length, expr = nil)
click to toggle source
# File lib/puppet/pops/model/ast.rb 1415 def self.create(locator, offset, length, expr = nil) 1416 ta = Types::TypeAsserter 1417 attrs = _pcore_type.attributes(true) 1418 ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator) 1419 ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset) 1420 ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length) 1421 ta.assert_instance_of('Puppet::AST::QueryExpression[expr]', attrs['expr'].type, expr) 1422 new(locator, offset, length, expr) 1423 end
from_asserted_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 1407 def self.from_asserted_hash(init_hash) 1408 new( 1409 init_hash['locator'], 1410 init_hash['offset'], 1411 init_hash['length'], 1412 init_hash['expr']) 1413 end
from_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 1403 def self.from_hash(init_hash) 1404 from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::QueryExpression initializer', _pcore_type.init_hash_type, init_hash)) 1405 end
new(locator, offset, length, expr = nil)
click to toggle source
Calls superclass method
Puppet::Pops::Model::Positioned::new
# File lib/puppet/pops/model/ast.rb 1427 def initialize(locator, offset, length, expr = nil) 1428 super(locator, offset, length) 1429 @hash = @hash ^ expr.hash 1430 @expr = expr 1431 end
Public Instance Methods
_pcore_all_contents(path, &block)
click to toggle source
# File lib/puppet/pops/model/ast.rb 1443 def _pcore_all_contents(path, &block) 1444 path << self 1445 unless @expr.nil? 1446 block.call(@expr, path) 1447 @expr._pcore_all_contents(path, &block) 1448 end 1449 path.pop 1450 end
_pcore_contents() { |expr| ... }
click to toggle source
# File lib/puppet/pops/model/ast.rb 1439 def _pcore_contents 1440 yield(@expr) unless @expr.nil? 1441 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 1433 def _pcore_init_hash 1434 result = super 1435 result['expr'] = @expr unless @expr == nil 1436 result 1437 end
eql?(o)
click to toggle source
Calls superclass method
Puppet::Pops::Model::PopsObject#eql?
# File lib/puppet/pops/model/ast.rb 1452 def eql?(o) 1453 super && 1454 @expr.eql?(o.expr) 1455 end
Also aliased as: ==