summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-11 18:13:51 -0600
committerLuke Kanies <luke@madstop.com>2008-02-11 18:13:51 -0600
commit744cd45378384d33b3118351536e70cd6ea8370d (patch)
treef05dafb7b978f1aba073dd637a83db3419ff6aa2 /lib/puppet
parentd21416b534eaa5717eca850cfe848716a9b1dc09 (diff)
downloadpuppet-744cd45378384d33b3118351536e70cd6ea8370d.tar.gz
puppet-744cd45378384d33b3118351536e70cd6ea8370d.tar.xz
puppet-744cd45378384d33b3118351536e70cd6ea8370d.zip
Added a 'tagged?' method to the Tagging module.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/util/tagging.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/util/tagging.rb b/lib/puppet/util/tagging.rb
index 25d74c420..9abb3fb2b 100644
--- a/lib/puppet/util/tagging.rb
+++ b/lib/puppet/util/tagging.rb
@@ -19,6 +19,11 @@ module Puppet::Util::Tagging
qualified.collect { |name| name.split("::") }.flatten.each { |tag| @tags << tag unless @tags.include?(tag) }
end
+ # Are we tagged with the provided tag?
+ def tagged?(tag)
+ defined?(@tags) and @tags.include?(tag.to_s)
+ end
+
# Return a copy of the tag list, so someone can't ask for our tags
# and then modify them.
def tags