Class: Puppet::Pops::Types::PHostClassType
- Inherits:
-
PCatalogEntryType
- Object
- TypedModelObject
- PAnyType
- PCatalogEntryType
- Puppet::Pops::Types::PHostClassType
- Defined in:
- lib/puppet/pops/types/types.rb
Overview
Represents a (host-) class in the Puppet Language.
Constant Summary collapse
- NAME =
'Class'.freeze
- DEFAULT =
PHostClassType.new(nil)
Instance Attribute Summary collapse
- #class_name ⇒ Object readonly
Class Method Summary collapse
Instance Method Summary collapse
- #eql?(o) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(class_name) ⇒ PHostClassType
constructor
A new instance of PHostClassType.
Methods inherited from PCatalogEntryType
Methods inherited from PAnyType
#==, #accept, #assignable?, #callable?, #callable_args?, #callable_with?, #check_self_recursion, #create, create, #generalize, #instance?, #iterable?, #iterable_type, #kind_of_callable?, #name, #new_function, new_function, #normalize, #really_instance?, #resolve, #roundtrip_with_string?, #simple_name, #to_alias_expanded_s, #to_s
Methods inherited from TypedModelObject
_pcore_type, create_ptype, register_ptypes
Methods included from Visitable
Methods included from PuppetObject
#_pcore_all_contents, #_pcore_contents, #_pcore_init_hash, #_pcore_type
Constructor Details
#initialize(class_name) ⇒ PHostClassType
Returns a new instance of PHostClassType.
2932 2933 2934 |
# File 'lib/puppet/pops/types/types.rb', line 2932 def initialize(class_name) @class_name = class_name end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
2919 2920 2921 |
# File 'lib/puppet/pops/types/types.rb', line 2919 def class_name @class_name end |
Class Method Details
.register_ptype(loader, ir) ⇒ Object
2921 2922 2923 2924 2925 2926 2927 2928 |
# File 'lib/puppet/pops/types/types.rb', line 2921 def self.register_ptype(loader, ir) create_ptype(loader, ir, 'CatalogEntryType', 'class_name' => { KEY_TYPE => POptionalType.new(PStringType::NON_EMPTY), KEY_VALUE => nil } ) end |
Instance Method Details
#eql?(o) ⇒ Boolean
2939 2940 2941 |
# File 'lib/puppet/pops/types/types.rb', line 2939 def eql?(o) self.class == o.class && @class_name == o.class_name end |
#hash ⇒ Object
2936 2937 2938 |
# File 'lib/puppet/pops/types/types.rb', line 2936 def hash 11 ^ @class_name.hash end |