Method: PDK::Generate::PuppetObject#can_run?

Defined in:
lib/pdk/generate/puppet_object.rb

#can_run?Boolean

Check the preconditions of this template group, behaving as a predicate rather than raising an exception.

Returns:

  • (Boolean)

    true if the generator is safe to run, otherwise false.



70
71
72
73
74
75
# File 'lib/pdk/generate/puppet_object.rb', line 70

def can_run?
  check_preconditions
  true
rescue StandardError
  false
end