Method: Puppet::Util::Tagging#tag

Defined in:
lib/vendor/puppet/util/tagging.rb

#tag(*ary) ⇒ Object

Add a tag to our current list. These tags will be added to all of the objects contained in this scope.



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/vendor/puppet/util/tagging.rb', line 26

def tag(*ary)
  @tags ||= []

  qualified = []

  ary.collect { |tag| tag.to_s.downcase }.each do |tag|
    fail(Puppet::ParseError, "Invalid tag #{tag.inspect}") unless valid_tag?(tag)
    qualified << tag if tag.include?("::")
    @tags << tag unless @tags.include?(tag)
  end

  handle_qualified_tags( qualified )
end