Method: Puppet::Util::Feature#test
- Defined in:
- lib/vendor/puppet/util/feature.rb
#test(name, options) ⇒ Object
Actually test whether the feature is present. We only want to test when someone asks for the feature, so we don’t unnecessarily load files.
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/vendor/puppet/util/feature.rb', line 56 def test(name, ) return true unless ary = [:libs] ary = [ary] unless ary.is_a?(Array) ary.each do |lib| return false unless load_library(lib, name) end # We loaded all of the required libraries true end |