Class: Puppet::Pops::Types::PTypeReferenceType Private

Inherits:
PAnyType show all
Defined in:
lib/puppet/pops/types/types.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API:

  • private

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PAnyType

#==, #accept, #assignable?, #callable_args?, #callable_with?, #check_self_recursion, create, #create, #generalize, #iterable?, #iterable_type, #kind_of_callable?, #loader, #name, new_function, #new_function, #normalize, #really_instance?, #roundtrip_with_string?, #simple_name, simple_name, #to_alias_expanded_s, #to_s

Methods inherited from TypedModelObject

_pcore_type, create_ptype, register_ptypes

Methods included from Visitable

#accept

Methods included from PuppetObject

#_pcore_all_contents, #_pcore_contents, #_pcore_init_hash, #_pcore_type, #to_s

Constructor Details

#initialize(type_string) ⇒ PTypeReferenceType

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of PTypeReferenceType.

API:

  • private



3311
3312
3313
# File 'lib/puppet/pops/types/types.rb', line 3311

def initialize(type_string)
  @type_string = type_string
end

Instance Attribute Details

#type_stringObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



3309
3310
3311
# File 'lib/puppet/pops/types/types.rb', line 3309

def type_string
  @type_string
end

Class Method Details

.register_ptype(loader, ir) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



3305
3306
3307
# File 'lib/puppet/pops/types/types.rb', line 3305

def self.register_ptype(loader, ir)
  create_ptype(loader, ir, 'AnyType', 'type_string' => PStringType::NON_EMPTY)
end

Instance Method Details

#callable?(args) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



3315
3316
3317
# File 'lib/puppet/pops/types/types.rb', line 3315

def callable?(args)
  false
end

#eql?(o) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



3327
3328
3329
# File 'lib/puppet/pops/types/types.rb', line 3327

def eql?(o)
  super && o.type_string == @type_string
end

#hashObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



3323
3324
3325
# File 'lib/puppet/pops/types/types.rb', line 3323

def hash
  @type_string.hash
end

#instance?(o, guard = nil) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



3319
3320
3321
# File 'lib/puppet/pops/types/types.rb', line 3319

def instance?(o, guard = nil)
  false
end

#resolve(loader) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



3331
3332
3333
# File 'lib/puppet/pops/types/types.rb', line 3331

def resolve(loader)
  TypeParser.singleton.parse(@type_string, loader)
end