Class: Bogeyman::Response
- Inherits:
-
Object
- Object
- Bogeyman::Response
- Defined in:
- lib/bogeyman/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(hash) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(hash) ⇒ Response
Returns a new instance of Response.
7 8 9 10 |
# File 'lib/bogeyman/response.rb', line 7 def initialize hash @code = hash['response']['code'] @body = hash['response']['body'] end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/bogeyman/response.rb', line 5 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/bogeyman/response.rb', line 5 def code @code end |
Instance Method Details
#html ⇒ Object
12 13 14 |
# File 'lib/bogeyman/response.rb', line 12 def html Nokogiri::HTML(@body) end |