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

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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from PAnyType

#==, #accept, #assignable?, #callable_args?, #generalize, #iterable?, #iterable_type, #kind_of_callable?, #normalize, #simple_name, #to_alias_expanded_s, #to_s

Methods included from Visitable

#accept

Constructor Details

#initialize(name, parameters = nil) ⇒ 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.



2201
2202
2203
2204
# File 'lib/puppet/pops/types/types.rb', line 2201

def initialize(name, parameters = nil)
  @name = name
  @parameters = parameters.nil? ? EMPTY_ARRAY : parameters
end

Instance Attribute Details

#nameObject (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.



2199
2200
2201
# File 'lib/puppet/pops/types/types.rb', line 2199

def name
  @name
end

#parametersObject (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.



2199
2200
2201
# File 'lib/puppet/pops/types/types.rb', line 2199

def parameters
  @parameters
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:

  • (Boolean)


2206
2207
2208
# File 'lib/puppet/pops/types/types.rb', line 2206

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:

  • (Boolean)


2218
2219
2220
# File 'lib/puppet/pops/types/types.rb', line 2218

def eql?(o)
  super && o.name == @name && o.parameters == @parameters
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.



2214
2215
2216
# File 'lib/puppet/pops/types/types.rb', line 2214

def hash
  @name.hash ^ @parameters.hash
end

#instance?(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:

  • (Boolean)


2210
2211
2212
# File 'lib/puppet/pops/types/types.rb', line 2210

def instance?(o)
  false
end