Class: Watobo::Response
- Inherits:
-
Array
- Object
- Array
- Watobo::Response
show all
- Defined in:
- lib/watobo/core/response.rb
Overview
Constant Summary
Constants included
from Diff::LCS
Diff::LCS::BalancedCallbacks, Diff::LCS::PATCH_MAP, Diff::LCS::SequenceCallbacks, Diff::LCS::VERSION
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Diff::LCS
LCS, __diff_direction, __inverse_vector, __lcs, __normalize_patchset, __position_hash, __replace_next_larger, diff, #diff, #lcs, patch, #patch, #patch!, patch!, sdiff, #sdiff, traverse_balanced, #traverse_balanced, traverse_sequences, #traverse_sequences, #unpatch, #unpatch!, unpatch!
Constructor Details
#initialize(r) ⇒ Response
Returns a new instance of Response.
Class Method Details
.create(response) ⇒ Object
.is_html? ⇒ Boolean
13
14
15
|
# File 'lib/watobo/core/response.rb', line 13
def self.is_html?
end
|
.is_json? ⇒ Boolean
17
18
19
|
# File 'lib/watobo/core/response.rb', line 17
def self.is_json?
end
|
Instance Method Details
#data ⇒ Object
42
43
44
|
# File 'lib/watobo/core/response.rb', line 42
def data
@data
end
|
#to_s ⇒ Object
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/watobo/core/response.rb', line 30
def to_s
data = self.join
unless has_body?
data << "\r\n" unless data =~ /\r\n\r\n$/
end
data
end
|