Class: Groonga::Client::Protocol::GQTP::RawResponse
- Inherits:
-
Object
- Object
- Groonga::Client::Protocol::GQTP::RawResponse
- Includes:
- ERB::Util
- Defined in:
- lib/groonga/client/protocol/gqtp.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#header ⇒ Object
Returns the value of attribute header.
Instance Method Summary collapse
-
#initialize(command) ⇒ RawResponse
constructor
A new instance of RawResponse.
- #to_groonga_command_compatible_response ⇒ Object
Constructor Details
#initialize(command) ⇒ RawResponse
Returns a new instance of RawResponse.
93 94 95 96 97 98 |
# File 'lib/groonga/client/protocol/gqtp.rb', line 93 def initialize(command) @start_time = Time.now.to_f @command = command @header = nil @body = nil end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
92 93 94 |
# File 'lib/groonga/client/protocol/gqtp.rb', line 92 def body @body end |
#header ⇒ Object
Returns the value of attribute header.
91 92 93 |
# File 'lib/groonga/client/protocol/gqtp.rb', line 91 def header @header end |
Instance Method Details
#to_groonga_command_compatible_response ⇒ Object
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/groonga/client/protocol/gqtp.rb', line 100 def to_groonga_command_compatible_response case @command.output_type when :json convert_for_json when :xml convert_for_xml when :none @body end end |