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

#assignable?, #callable?, #callable_args?, #enumerable?, #generalize, #instance?, #kind_of_callable?, #simple_name, #to_s

Methods included from Visitable

#accept

Constructor Details

#initialize(class_name) ⇒ PHostClassType

Returns a new instance of PHostClassType.



1448
1449
1450
# File 'lib/puppet/pops/types/types.rb', line 1448

def initialize(class_name)
  @class_name = class_name
end

Instance Attribute Details

#class_nameObject (readonly)



1446
1447
1448
# File 'lib/puppet/pops/types/types.rb', line 1446

def class_name
  @class_name
end

Instance Method Details

#==(o) ⇒ Object



1455
1456
1457
# File 'lib/puppet/pops/types/types.rb', line 1455

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

#hashObject



1452
1453
1454
# File 'lib/puppet/pops/types/types.rb', line 1452

def hash
  11 * @class_name.hash
end