Class: Bracken::Logfile::Filter
- Inherits:
-
Struct
- Object
- Struct
- Bracken::Logfile::Filter
- Defined in:
- lib/bracken/logfile/filter.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#service ⇒ Object
Returns the value of attribute service.
Instance Method Summary collapse
-
#match?(line) ⇒ Boolean
FIXME this is heinous.
Instance Attribute Details
#pattern ⇒ Object
Returns the value of attribute pattern
4 5 6 |
# File 'lib/bracken/logfile/filter.rb', line 4 def pattern @pattern end |
#service ⇒ Object
Returns the value of attribute service
4 5 6 |
# File 'lib/bracken/logfile/filter.rb', line 4 def service @service end |
Instance Method Details
#match?(line) ⇒ Boolean
FIXME this is heinous
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bracken/logfile/filter.rb', line 6 def match?(line) if line.include?(service) if pattern if line.match(pattern) true else false end else true end else false end end |