Class: Tsumamigui::Response
- Inherits:
-
Object
- Object
- Tsumamigui::Response
- Defined in:
- lib/tsumamigui/response.rb
Instance Attribute Summary collapse
-
#charset ⇒ Object
readonly
charset of fetched html.
-
#html ⇒ Object
readonly
fetched html.
-
#url ⇒ Object
readonly
request url.
Instance Method Summary collapse
-
#initialize(url, html, charset) ⇒ Response
constructor
A new instance of Response.
-
#to_array ⇒ Array
Convert request data to array.
Constructor Details
#initialize(url, html, charset) ⇒ Response
Returns a new instance of Response.
13 14 15 16 17 |
# File 'lib/tsumamigui/response.rb', line 13 def initialize(url, html, charset) @url = url @html = html @charset = charset end |
Instance Attribute Details
#charset ⇒ Object (readonly)
charset of fetched html
8 9 10 |
# File 'lib/tsumamigui/response.rb', line 8 def charset @charset end |
#html ⇒ Object (readonly)
fetched html
6 7 8 |
# File 'lib/tsumamigui/response.rb', line 6 def html @html end |
#url ⇒ Object (readonly)
request url
4 5 6 |
# File 'lib/tsumamigui/response.rb', line 4 def url @url end |
Instance Method Details
#to_array ⇒ Array
Convert request data to array
21 22 23 |
# File 'lib/tsumamigui/response.rb', line 21 def to_array [@url, @html, @charset] end |