Method: Puppet::Resource.resource_type
- Defined in:
- lib/puppet/resource.rb
.resource_type(type, title, environment) ⇒ Puppet::Type, Puppet::Resource::Type
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.
The resource’s type implementation
375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/puppet/resource.rb', line 375 def self.resource_type(type, title, environment) case type when TYPE_CLASS; environment.known_resource_types.hostclass(title == :main ? "" : title) when TYPE_NODE; environment.known_resource_types.node(title) else result = Puppet::Type.type(type) if !result krt = environment.known_resource_types result = krt.definition(type) end result end end |