Module: Log::Tags
- Included in:
- Log
- Defined in:
- lib/log/tags.rb
Instance Method Summary collapse
- #excluded_tags ⇒ Object (also: #logger_excluded_tags)
- #included_tags ⇒ Object (also: #logger_included_tags)
- #tag=(tag) ⇒ Object
- #tag?(tag) ⇒ Boolean (also: #logger_tag?)
- #tags ⇒ Object (also: #logger_tags)
- #tags=(tags) ⇒ Object
- #tags? ⇒ Boolean (also: #logger_tags?)
Instance Method Details
#excluded_tags ⇒ Object Also known as:
12 13 14 |
# File 'lib/log/tags.rb', line 12 def ||= [] end |
#included_tags ⇒ Object Also known as:
7 8 9 |
# File 'lib/log/tags.rb', line 7 def ||= [] end |
#tag=(tag) ⇒ Object
36 37 38 |
# File 'lib/log/tags.rb', line 36 def tag=(tag) self. = tag end |
#tag?(tag) ⇒ Boolean Also known as: logger_tag?
45 46 47 |
# File 'lib/log/tags.rb', line 45 def tag?(tag) .include?(tag) end |
#tags ⇒ Object Also known as:
2 3 4 |
# File 'lib/log/tags.rb', line 2 def ||= [] end |
#tags=(tags) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/log/tags.rb', line 17 def () if .nil? = nil return end = Array() .each do |tag| unless tag.to_s.start_with?('-') << tag else << tag[1..-1].to_sym end end = end |
#tags? ⇒ Boolean Also known as:
40 41 42 |
# File 'lib/log/tags.rb', line 40 def !.empty? end |