summaryrefslogtreecommitdiff
path: root/lib/chef/node.rb
diff options
context:
space:
mode:
authorPaul Mooring <paul@opscode.com>2013-08-27 17:25:58 -0700
committerBryan McLellan <btm@opscode.com>2013-10-04 09:52:10 -0700
commit9e954aeb26e83bb77a645c76a184df5a265161d6 (patch)
treec3835dfe69e93d23eff4052d2fb9ed7a5a29bd81 /lib/chef/node.rb
parentc99665770f2e9f8e118179b807cdd8ffebbd3e63 (diff)
downloadchef-9e954aeb26e83bb77a645c76a184df5a265161d6.tar.gz
Moved Chef::Recipe#tag into the Chef::Node object
Diffstat (limited to 'lib/chef/node.rb')
-rw-r--r--lib/chef/node.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb
index 6bd2226ac8..007bd3c560 100644
--- a/lib/chef/node.rb
+++ b/lib/chef/node.rb
@@ -290,6 +290,14 @@ class Chef
normal[:tags]
end
+ def tag(*tags)
+ tags.each do |tag|
+ self.normal[:tags].push(tag.to_s) unless self[:tags].include? tag.to_s
+ end
+
+ self[:tags]
+ end
+
# Extracts the run list from +attrs+ and applies it. Returns the remaining attributes
def consume_run_list(attrs)
attrs = attrs ? attrs.dup : {}