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:
13 14 15 |
# File 'lib/log/tags.rb', line 13 def @excluded_tags ||= [] end |
#included_tags ⇒ Object Also known as:
8 9 10 |
# File 'lib/log/tags.rb', line 8 def @included_tags ||= [] end |
#tag=(tag) ⇒ Object
37 38 39 |
# File 'lib/log/tags.rb', line 37 def tag=(tag) self. = tag end |
#tag?(tag) ⇒ Boolean Also known as: logger_tag?
46 47 48 |
# File 'lib/log/tags.rb', line 46 def tag?(tag) .include?(tag) end |
#tags ⇒ Object Also known as:
3 4 5 |
# File 'lib/log/tags.rb', line 3 def @tags ||= [] end |
#tags=(tags) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/log/tags.rb', line 18 def () if .nil? @tags = nil return end = Array() .each do |tag| unless tag.to_s.start_with?('-') << tag else << tag[1..-1].to_sym end end @tags = end |
#tags? ⇒ Boolean Also known as:
41 42 43 |
# File 'lib/log/tags.rb', line 41 def !.empty? end |