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

Public Instance Methods

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