module Log::Tags

Public Instance Methods

excluded_tags() click to toggle source
# File lib/log/tags.rb, line 13
def excluded_tags
  @excluded_tags ||= []
end
Also aliased as: logger_excluded_tags
included_tags() click to toggle source
# File lib/log/tags.rb, line 8
def included_tags
  @included_tags ||= []
end
Also aliased as: logger_included_tags
logger_excluded_tags()
Alias for: excluded_tags
logger_included_tags()
Alias for: included_tags
logger_tag?(tag)
Alias for: tag?
logger_tags()
Alias for: tags
logger_tags?()
Alias for: tags?
tag=(tag) click to toggle source
# File lib/log/tags.rb, line 37
def tag=(tag)
  self.tags = tag
end
tag?(tag) click to toggle source
# File lib/log/tags.rb, line 46
def tag?(tag)
  tags.include?(tag)
end
Also aliased as: logger_tag?
tags() click to toggle source
# File lib/log/tags.rb, line 3
def tags
  @tags ||= []
end
Also aliased as: logger_tags
tags=(tags) click to toggle source
# File lib/log/tags.rb, line 18
def tags=(tags)
  if tags.nil?
    @tags = nil
    return
  end

  tags = Array(tags)

  tags.each do |tag|
    unless tag.to_s.start_with?('-')
      included_tags << tag
    else
      excluded_tags << tag[1..-1].to_sym
    end
  end

  @tags = tags
end
tags?() click to toggle source
# File lib/log/tags.rb, line 41
def tags?
  !tags.empty?
end
Also aliased as: logger_tags?