class Puppet::Pops::Model::EppExpression

Attributes

body[R]
parameters_specified[R]

Public Class Methods

_pcore_type() click to toggle source
     # File lib/puppet/pops/model/ast.rb
3750 def self._pcore_type
3751   @_pcore_type ||= Types::PObjectType.new('Puppet::AST::EppExpression', {
3752     'parent' => Expression._pcore_type,
3753     'attributes' => {
3754       'parameters_specified' => {
3755         'type' => Types::POptionalType.new(Types::PBooleanType::DEFAULT),
3756         'value' => nil
3757       },
3758       'body' => {
3759         'type' => Types::POptionalType.new(Expression._pcore_type),
3760         'value' => nil
3761       }
3762     }
3763   })
3764 end
create(locator, offset, length, parameters_specified = nil, body = nil) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3779 def self.create(locator, offset, length, parameters_specified = nil, body = nil)
3780   ta = Types::TypeAsserter
3781   attrs = _pcore_type.attributes(true)
3782   ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
3783   ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
3784   ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
3785   ta.assert_instance_of('Puppet::AST::EppExpression[parameters_specified]', attrs['parameters_specified'].type, parameters_specified)
3786   ta.assert_instance_of('Puppet::AST::EppExpression[body]', attrs['body'].type, body)
3787   new(locator, offset, length, parameters_specified, body)
3788 end
from_asserted_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3770 def self.from_asserted_hash(init_hash)
3771   new(
3772     init_hash['locator'],
3773     init_hash['offset'],
3774     init_hash['length'],
3775     init_hash['parameters_specified'],
3776     init_hash['body'])
3777 end
from_hash(init_hash) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3766 def self.from_hash(init_hash)
3767   from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::EppExpression initializer', _pcore_type.init_hash_type, init_hash))
3768 end
new(locator, offset, length, parameters_specified = nil, body = nil) click to toggle source
Calls superclass method Puppet::Pops::Model::Positioned::new
     # File lib/puppet/pops/model/ast.rb
3793 def initialize(locator, offset, length, parameters_specified = nil, body = nil)
3794   super(locator, offset, length)
3795   @hash = @hash ^ parameters_specified.hash ^ body.hash
3796   @parameters_specified = parameters_specified
3797   @body = body
3798 end

Public Instance Methods

==(o)
Alias for: eql?
_pcore_all_contents(path, &block) click to toggle source
     # File lib/puppet/pops/model/ast.rb
3811 def _pcore_all_contents(path, &block)
3812   path << self
3813   unless @body.nil?
3814     block.call(@body, path)
3815     @body._pcore_all_contents(path, &block)
3816   end
3817   path.pop
3818 end
_pcore_contents() { |body| ... } click to toggle source
     # File lib/puppet/pops/model/ast.rb
3807 def _pcore_contents
3808   yield(@body) unless @body.nil?
3809 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
3800 def _pcore_init_hash
3801   result = super
3802   result['parameters_specified'] = @parameters_specified unless @parameters_specified == nil
3803   result['body'] = @body unless @body == nil
3804   result
3805 end
eql?(o) click to toggle source
Calls superclass method Puppet::Pops::Model::PopsObject#eql?
     # File lib/puppet/pops/model/ast.rb
3820 def eql?(o)
3821   super &&
3822   @parameters_specified.eql?(o.parameters_specified) &&
3823   @body.eql?(o.body)
3824 end
Also aliased as: ==