Class: Sherlog::CountListener
- Inherits:
-
Object
- Object
- Sherlog::CountListener
- Defined in:
- lib/sherlog_holmes/listeners/count_listener.rb
Instance Attribute Summary collapse
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#exceptions ⇒ Object
readonly
Returns the value of attribute exceptions.
-
#levels ⇒ Object
readonly
Returns the value of attribute levels.
-
#origins ⇒ Object
readonly
Returns the value of attribute origins.
Instance Method Summary collapse
- #call(entry) ⇒ Object
-
#initialize ⇒ CountListener
constructor
A new instance of CountListener.
Constructor Details
#initialize ⇒ CountListener
Returns a new instance of CountListener.
28 29 30 31 32 33 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 28 def initialize @levels = {} @categories = {} @origins = {} @exceptions = {} end |
Instance Attribute Details
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
26 27 28 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 26 def categories @categories end |
#exceptions ⇒ Object (readonly)
Returns the value of attribute exceptions.
26 27 28 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 26 def exceptions @exceptions end |
#levels ⇒ Object (readonly)
Returns the value of attribute levels.
26 27 28 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 26 def levels @levels end |
#origins ⇒ Object (readonly)
Returns the value of attribute origins.
26 27 28 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 26 def origins @origins end |
Instance Method Details
#call(entry) ⇒ Object
35 36 37 38 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 35 def call(entry) initialize_counters entry count entry end |