class Puppet::Pops::Model::HeredocExpression
Attributes
syntax[R]
text_expr[R]
Public Class Methods
_pcore_type()
click to toggle source
# File lib/puppet/pops/model/ast.rb 2444 def self._pcore_type 2445 @_pcore_type ||= Types::PObjectType.new('Puppet::AST::HeredocExpression', { 2446 'parent' => Expression._pcore_type, 2447 'attributes' => { 2448 'syntax' => { 2449 'type' => Types::POptionalType.new(Types::PStringType::DEFAULT), 2450 'value' => nil 2451 }, 2452 'text_expr' => Expression._pcore_type 2453 } 2454 }) 2455 end
create(locator, offset, length, text_expr, syntax = nil)
click to toggle source
# File lib/puppet/pops/model/ast.rb 2470 def self.create(locator, offset, length, text_expr, syntax = nil) 2471 ta = Types::TypeAsserter 2472 attrs = _pcore_type.attributes(true) 2473 ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator) 2474 ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset) 2475 ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length) 2476 ta.assert_instance_of('Puppet::AST::HeredocExpression[syntax]', attrs['syntax'].type, syntax) 2477 ta.assert_instance_of('Puppet::AST::HeredocExpression[text_expr]', attrs['text_expr'].type, text_expr) 2478 new(locator, offset, length, text_expr, syntax) 2479 end
from_asserted_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 2461 def self.from_asserted_hash(init_hash) 2462 new( 2463 init_hash['locator'], 2464 init_hash['offset'], 2465 init_hash['length'], 2466 init_hash['text_expr'], 2467 init_hash['syntax']) 2468 end
from_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 2457 def self.from_hash(init_hash) 2458 from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::HeredocExpression initializer', _pcore_type.init_hash_type, init_hash)) 2459 end
new(locator, offset, length, text_expr, syntax = nil)
click to toggle source
Calls superclass method
Puppet::Pops::Model::Positioned::new
# File lib/puppet/pops/model/ast.rb 2484 def initialize(locator, offset, length, text_expr, syntax = nil) 2485 super(locator, offset, length) 2486 @hash = @hash ^ syntax.hash ^ text_expr.hash 2487 @syntax = syntax 2488 @text_expr = text_expr 2489 end
Public Instance Methods
_pcore_all_contents(path, &block)
click to toggle source
# File lib/puppet/pops/model/ast.rb 2502 def _pcore_all_contents(path, &block) 2503 path << self 2504 unless @text_expr.nil? 2505 block.call(@text_expr, path) 2506 @text_expr._pcore_all_contents(path, &block) 2507 end 2508 path.pop 2509 end
_pcore_contents() { |text_expr| ... }
click to toggle source
# File lib/puppet/pops/model/ast.rb 2498 def _pcore_contents 2499 yield(@text_expr) unless @text_expr.nil? 2500 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 2491 def _pcore_init_hash 2492 result = super 2493 result['syntax'] = @syntax unless @syntax == nil 2494 result['text_expr'] = @text_expr 2495 result 2496 end
eql?(o)
click to toggle source
Calls superclass method
Puppet::Pops::Model::PopsObject#eql?
# File lib/puppet/pops/model/ast.rb 2511 def eql?(o) 2512 super && 2513 @syntax.eql?(o.syntax) && 2514 @text_expr.eql?(o.text_expr) 2515 end
Also aliased as: ==