Class: LogMagic::BaseRefiner
- Inherits:
-
Object
- Object
- LogMagic::BaseRefiner
- Defined in:
- lib/log_magic/refiners/base_refiner.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#lines ⇒ Object
Returns the value of attribute lines.
Instance Method Summary collapse
-
#initialize ⇒ BaseRefiner
constructor
A new instance of BaseRefiner.
- #matches? ⇒ Boolean
- #persistance_layer ⇒ Object
Constructor Details
#initialize ⇒ BaseRefiner
Returns a new instance of BaseRefiner.
4 5 6 |
# File 'lib/log_magic/refiners/base_refiner.rb', line 4 def initialize @lines = [] end |
Instance Attribute Details
#lines ⇒ Object
Returns the value of attribute lines.
2 3 4 |
# File 'lib/log_magic/refiners/base_refiner.rb', line 2 def lines @lines end |
Instance Method Details
#matches? ⇒ Boolean
8 9 10 |
# File 'lib/log_magic/refiners/base_refiner.rb', line 8 def matches? lines.last.force_encoding("utf-8") =~ line_match_regex end |
#persistance_layer ⇒ Object
12 13 14 |
# File 'lib/log_magic/refiners/base_refiner.rb', line 12 def persistance_layer @persistance_layer ||= ::LogMagic::PersistanceLayer.new end |