class Puppet::Pops::Model::AbstractResource
Attributes
form[R]
Public Class Methods
_pcore_type()
click to toggle source
# File lib/puppet/pops/model/ast.rb 3943 def self._pcore_type 3944 @_pcore_type ||= Types::PObjectType.new('Puppet::AST::AbstractResource', { 3945 'parent' => Expression._pcore_type, 3946 'attributes' => { 3947 'form' => { 3948 'type' => Types::PEnumType.new(['exported', 'regular', 'virtual']), 3949 'value' => 'regular' 3950 }, 3951 'virtual' => { 3952 'type' => Types::PBooleanType::DEFAULT, 3953 'kind' => 'derived' 3954 }, 3955 'exported' => { 3956 'type' => Types::PBooleanType::DEFAULT, 3957 'kind' => 'derived' 3958 } 3959 } 3960 }) 3961 end
create(locator, offset, length, form = "regular")
click to toggle source
# File lib/puppet/pops/model/ast.rb 3975 def self.create(locator, offset, length, form = "regular") 3976 ta = Types::TypeAsserter 3977 attrs = _pcore_type.attributes(true) 3978 ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator) 3979 ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset) 3980 ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length) 3981 ta.assert_instance_of('Puppet::AST::AbstractResource[form]', attrs['form'].type, form) 3982 new(locator, offset, length, form) 3983 end
from_asserted_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 3967 def self.from_asserted_hash(init_hash) 3968 new( 3969 init_hash['locator'], 3970 init_hash['offset'], 3971 init_hash['length'], 3972 init_hash.fetch('form') { "regular" }) 3973 end
from_hash(init_hash)
click to toggle source
# File lib/puppet/pops/model/ast.rb 3963 def self.from_hash(init_hash) 3964 from_asserted_hash(Types::TypeAsserter.assert_instance_of('Puppet::AST::AbstractResource initializer', _pcore_type.init_hash_type, init_hash)) 3965 end
new(locator, offset, length, form = "regular")
click to toggle source
Calls superclass method
Puppet::Pops::Model::Positioned::new
# File lib/puppet/pops/model/ast.rb 3995 def initialize(locator, offset, length, form = "regular") 3996 super(locator, offset, length) 3997 @hash = @hash ^ form.hash 3998 @form = form 3999 end
Public Instance Methods
_pcore_init_hash()
click to toggle source
Calls superclass method
Puppet::Pops::Model::Positioned#_pcore_init_hash
# File lib/puppet/pops/model/ast.rb 4001 def _pcore_init_hash 4002 result = super 4003 result['form'] = @form unless @form == "regular" 4004 result 4005 end
eql?(o)
click to toggle source
Calls superclass method
Puppet::Pops::Model::PopsObject#eql?
# File lib/puppet/pops/model/ast.rb 4007 def eql?(o) 4008 super && 4009 @form.eql?(o.form) 4010 end
Also aliased as: ==
exported()
click to toggle source
# File lib/puppet/pops/model/ast.rb 3991 def exported 3992 @form == 'exported' 3993 end
virtual()
click to toggle source
# File lib/puppet/pops/model/ast.rb 3987 def virtual 3988 @form == 'virtual' || @form == 'exported' 3989 end