Method: Puppet::Type.can_apply_to

Defined in:
lib/puppet/type.rb

.can_apply_to(target) ⇒ 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 true if this type is applicable to the given target.

Parameters:

  • target (Symbol)

    should be :device, :host or :target, if anything else, :host is enforced

Returns:

  • (Boolean)

    true



262
263
264
# File 'lib/puppet/type.rb', line 262

def self.can_apply_to(target)
  [target == :device ? :device : :host, :both].include?(apply_to)
end