Class: Groonga::QueryLog::ResponseComparer
- Inherits:
-
Object
- Object
- Groonga::QueryLog::ResponseComparer
- Defined in:
- lib/groonga/query-log/response-comparer.rb
Instance Method Summary collapse
-
#initialize(command, response1, response2) ⇒ ResponseComparer
constructor
A new instance of ResponseComparer.
- #same? ⇒ Boolean
Constructor Details
#initialize(command, response1, response2) ⇒ ResponseComparer
Returns a new instance of ResponseComparer.
20 21 22 23 24 |
# File 'lib/groonga/query-log/response-comparer.rb', line 20 def initialize(command, response1, response2) @command = command @response1 = response1 @response2 = response2 end |
Instance Method Details
#same? ⇒ Boolean
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/groonga/query-log/response-comparer.rb', line 26 def same? if error_response?(@response1) or error_response?(@response2) if error_response?(@response1) and error_response?(@response2) same_error_response? else false end else case @command.name when "select" same_select_response? else same_response? end end end |