Hash
# File lib/fluent/config.rb, line 49 def +(o) Element.new(@name.dup, @arg.dup, o.merge(self), @elements+o.elements, @used+o.used) end
# File lib/fluent/config.rb, line 58 def [](key) @used << key super end
# File lib/fluent/config.rb, line 43 def add_element(name, arg='') e = Element.new(name, arg, {}, []) @elements << e e end
# File lib/fluent/config.rb, line 63 def check_not_fetched(&block) each_key {|key| unless @used.include?(key) block.call(key, self) end } @elements.each {|e| e.check_not_fetched(&block) } end
# File lib/fluent/config.rb, line 53 def has_key?(key) @used << key super end
# File lib/fluent/config.rb, line 74 def to_s(nest = 0) indent = " "*nest nindent = " "*(nest+1) out = "" if @arg.empty? out << "#{indent}<#{@name}>\n" else out << "#{indent}<#{@name} #{@arg}>\n" end each_pair {|k,v| out << "#{nindent}#{k} #{v}\n" } @elements.each {|e| out << e.to_s(nest+1) } out << "#{indent}</#{@name}>\n" out end
Generated with the Darkfish Rdoc Generator 2.