Class: Puppet::Pops::Types::PHostClassType

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

Overview

Represents a (host-) class in the Puppet Language.

Constant Summary collapse

DEFAULT =
PHostClassType.new(nil)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from PCatalogEntryType

#instance?

Methods inherited from PAnyType

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

Methods included from Visitable

#accept

Constructor Details

#initialize(class_name) ⇒ PHostClassType

Returns a new instance of PHostClassType.



2090
2091
2092
# File 'lib/puppet/pops/types/types.rb', line 2090

def initialize(class_name)
  @class_name = class_name
end

Instance Attribute Details

#class_nameObject (readonly)



2088
2089
2090
# File 'lib/puppet/pops/types/types.rb', line 2088

def class_name
  @class_name
end

Instance Method Details

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


2097
2098
2099
# File 'lib/puppet/pops/types/types.rb', line 2097

def eql?(o)
  self.class == o.class && @class_name == o.class_name
end

#hashObject



2094
2095
2096
# File 'lib/puppet/pops/types/types.rb', line 2094

def hash
  11 ^ @class_name.hash
end