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?, #check_self_recursion, #generalize, #iterable?, #iterable_type, #kind_of_callable?, #name, #new_function, new_function, #normalize, #really_instance?, simple_name, #simple_name, #to_alias_expanded_s, #to_s

Methods inherited from TypedModelObject

_ptype, create_ptype, register_ptypes

Methods included from Visitable

#accept

Methods included from PuppetObject

#_ptype

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



2951
2952
2953
# File 'lib/puppet/pops/types/types.rb', line 2951

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



2949
2950
2951
# File 'lib/puppet/pops/types/types.rb', line 2949

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



2945
2946
2947
# File 'lib/puppet/pops/types/types.rb', line 2945

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



2955
2956
2957
# File 'lib/puppet/pops/types/types.rb', line 2955

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



2967
2968
2969
# File 'lib/puppet/pops/types/types.rb', line 2967

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



2963
2964
2965
# File 'lib/puppet/pops/types/types.rb', line 2963

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



2959
2960
2961
# File 'lib/puppet/pops/types/types.rb', line 2959

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

#resolve(type_parser, 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



2971
2972
2973
# File 'lib/puppet/pops/types/types.rb', line 2971

def resolve(type_parser, loader)
  type_parser.parse(@type_string, loader)
end