class Puppet::Pops::Model::ApplyExpression
Attributes
arguments[R]
body[R]
Public Class Methods
_pcore_type()
click to toggle source
# File lib/puppet/pops/model/ast.rb 2730 def self._pcore_type 2731 @_pcore_type ||= Types::PObjectType.new('Puppet::AST::ApplyExpression', { 2732 'parent' => Expression._pcore_type, 2733 'attributes' => { 2734 'arguments' => { 2735 'type' => Types::PArrayType.new(Expression._pcore_type), 2736 'value' => [] 2737 }, 2738 'body' => { 2739 'type' => Types::POptionalType.new(Expression._pcore_type), 2740 'value' => nil 2741 } 2742 } 2743 }) 2744 end
create(locator, offset, length, arguments = _pcore_type['arguments'].value, body = nil)
click to toggle source
# File lib/puppet/pops/model/ast.rb 2759 def self.create(locator, offset, length, arguments = _pcore_type['arguments'].value, body = nil) 2760 ta = Types::TypeAsserter 2761 attrs = _pcore_type.attributes(true) 2762 ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator) 2763 ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset) 2764 ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length) 2765 ta.assert_instance_of('Puppet::AST::ApplyExpression[arguments]', attrs['arguments'].type, arguments) 2766 ta.assert_instance_of('Puppet::AST::ApplyExpression[body]', attrs['body'].type, body) 2767 new(locator, offset, length, arguments, body) 2768 end
from_asserted_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 2750 def self.from_asserted_hash(init_hash) 2751 new( 2752 init_hash['locator'], 2753 init_hash['offset'], 2754 init_hash['length'], 2755 init_hash.fetch('arguments') { _pcore_type['arguments'].value }, 2756 init_hash['body']) 2757 end
from_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 2746 def self.from_hash(init_hash) 2747 from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::ApplyExpression initializer', _pcore_type.init_hash_type, init_hash)) 2748 end
new(locator, offset, length, arguments = _pcore_type['arguments'].value, body = nil)
click to toggle source
Calls superclass method
Puppet::Pops::Model::Positioned::new
# File lib/puppet/pops/model/ast.rb 2773 def initialize(locator, offset, length, arguments = _pcore_type['arguments'].value, body = nil) 2774 super(locator, offset, length) 2775 @hash = @hash ^ arguments.hash ^ body.hash 2776 @arguments = arguments 2777 @body = body 2778 end
Public Instance Methods
_pcore_all_contents(path, &block)
click to toggle source
# File lib/puppet/pops/model/ast.rb 2792 def _pcore_all_contents(path, &block) 2793 path << self 2794 @arguments.each do |value| 2795 block.call(value, path) 2796 value._pcore_all_contents(path, &block) 2797 end 2798 unless @body.nil? 2799 block.call(@body, path) 2800 @body._pcore_all_contents(path, &block) 2801 end 2802 path.pop 2803 end
_pcore_contents() { |value| ... }
click to toggle source
# File lib/puppet/pops/model/ast.rb 2787 def _pcore_contents 2788 @arguments.each { |value| yield(value) } 2789 yield(@body) unless @body.nil? 2790 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 2780 def _pcore_init_hash 2781 result = super 2782 result['arguments'] = @arguments unless _pcore_type['arguments'].default_value?(@arguments) 2783 result['body'] = @body unless @body == nil 2784 result 2785 end
eql?(o)
click to toggle source
Calls superclass method
Puppet::Pops::Model::PopsObject#eql?
# File lib/puppet/pops/model/ast.rb 2805 def eql?(o) 2806 super && 2807 @arguments.eql?(o.arguments) && 2808 @body.eql?(o.body) 2809 end
Also aliased as: ==