Class: QueryCounter
- Inherits:
-
Object
- Object
- QueryCounter
- Defined in:
- lib/have_query_count/query_counter.rb
Constant Summary collapse
- IGNORE =
%w(CACHE SCHEMA TRANSACTION).freeze
Instance Attribute Summary collapse
-
#query_count ⇒ Object
readonly
Returns the value of attribute query_count.
Instance Method Summary collapse
-
#initialize ⇒ QueryCounter
constructor
A new instance of QueryCounter.
- #to_proc ⇒ Object
Constructor Details
#initialize ⇒ QueryCounter
Returns a new instance of QueryCounter.
6 7 8 |
# File 'lib/have_query_count/query_counter.rb', line 6 def initialize @query_count = 0 end |
Instance Attribute Details
#query_count ⇒ Object (readonly)
Returns the value of attribute query_count.
4 5 6 |
# File 'lib/have_query_count/query_counter.rb', line 4 def query_count @query_count end |
Instance Method Details
#to_proc ⇒ Object
10 |
# File 'lib/have_query_count/query_counter.rb', line 10 def to_proc = lambda(&method(:callback)) |