vendor/bundle/ruby/2.6.0/gems/lumberjack-1.2.8/lib/lumberjack/tag_formatter.rb
# Add a formatter for specific tag names. This can either be a Lumberjack::Formatter
# or an object that responds to `call` or a block. The default formatter will not be
# applied.
Add a formatter for specific tag names. This can either be a Lumberjack::Formatter
or an object that responds to `call` or a block. The default formatter will not be
applied.
Add a formatter for specific tag names . This can either be a Lumberjack :: Formatter or an object that responds to ` call ` or a block . The default formatter will not be applied .
def add(names, formatter = nil, &block)
      formatter ||= block
      formatter = dereference_formatter(formatter)
      if formatter.nil?
        remove(key)
      else
        Array(names).each do |name|
          @formatters[name.to_s] = formatter
        end
      end
      self
    end
def add ( names , formatter = nil , & block ) formatter ||= block formatter = dereference_formatter ( formatter ) if formatter . nil? remove ( key ) else Array ( names ) . each do | name | @formatters [ name . to_s ] = formatter end end self end
Add a formatter for specific tag names.
Add a formatter for specific tag names .
names
formatter
block