Class: Horseman::Response
- Inherits:
-
Object
- Object
- Horseman::Response
- Defined in:
- lib/horseman/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#forms ⇒ Object
readonly
Returns the value of attribute forms.
Instance Method Summary collapse
-
#initialize(body) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(body) ⇒ Response
Returns a new instance of Response.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/horseman/response.rb', line 21 def initialize(body) @body = body @forms = [] @field_types = { 'text' => :text, 'checkbox' => :checkbox, 'hidden' => :hidden, 'submit' => :submit } @encoding_types = { 'application/x-www-form-urlencoded' => :url, 'multipart/form-data' => :multipart } parse end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
19 20 21 |
# File 'lib/horseman/response.rb', line 19 def body @body end |
#forms ⇒ Object (readonly)
Returns the value of attribute forms.
19 20 21 |
# File 'lib/horseman/response.rb', line 19 def forms @forms end |