Class: Loghandler::Rules::OnRadioLogRule
- Inherits:
-
AbstractRule
- Object
- AbstractRule
- Loghandler::Rules::OnRadioLogRule
- Defined in:
- lib/loghandler/rules/on_radio_log_rule.rb
Instance Method Summary collapse
- #apply! ⇒ Object
-
#initialize(log_detail) ⇒ OnRadioLogRule
constructor
A new instance of OnRadioLogRule.
- #log ⇒ Object
- #match? ⇒ Boolean
- #persist? ⇒ Boolean
- #showable? ⇒ Boolean
Methods inherited from AbstractRule
Constructor Details
#initialize(log_detail) ⇒ OnRadioLogRule
Returns a new instance of OnRadioLogRule.
5 6 7 |
# File 'lib/loghandler/rules/on_radio_log_rule.rb', line 5 def initialize(log_detail) @log_detail=log_detail end |
Instance Method Details
#apply! ⇒ Object
13 14 15 |
# File 'lib/loghandler/rules/on_radio_log_rule.rb', line 13 def apply! @log_detail.merge!({converted:true}) end |
#log ⇒ Object
16 17 18 |
# File 'lib/loghandler/rules/on_radio_log_rule.rb', line 16 def log @log_detail.to_json end |
#match? ⇒ Boolean
8 9 10 11 12 |
# File 'lib/loghandler/rules/on_radio_log_rule.rb', line 8 def match? # return true if (filename == "./log/access.log") return true if (@log_detail[:content].match(/Nouveau scan de page/)) return false end |
#persist? ⇒ Boolean
19 20 21 |
# File 'lib/loghandler/rules/on_radio_log_rule.rb', line 19 def persist? false end |
#showable? ⇒ Boolean
22 23 24 |
# File 'lib/loghandler/rules/on_radio_log_rule.rb', line 22 def showable? true end |