Class: Sherlog::CountListener
- Inherits:
-
Object
- Object
- Sherlog::CountListener
- Defined in:
- lib/sherlog_holmes/listeners/count_listener.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
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 @level = {} @category = {} @origin = {} @exception = {} end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
26 27 28 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 26 def category @category end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
26 27 28 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 26 def exception @exception end |
#level ⇒ Object (readonly)
Returns the value of attribute level.
26 27 28 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 26 def level @level end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
26 27 28 |
# File 'lib/sherlog_holmes/listeners/count_listener.rb', line 26 def origin @origin 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 |