Skip to content

Instantly share code, notes, and snippets.

@torrancew
Created November 4, 2011 21:53
Show Gist options
  • Save torrancew/1340585 to your computer and use it in GitHub Desktop.
Save torrancew/1340585 to your computer and use it in GitHub Desktop.
module Puppet::Parser::Functions
newfunction(:using_module, :type => :rvalue) do |args|
included = true
modules = lookupvar('kmods').split(/,/)
args.each do |mod|
unless modules.include?(mod)
included = false
end
end
included
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment