Class: StatHat::Response
- Inherits:
-
Object
- Object
- StatHat::Response
- Defined in:
- lib/stathat.rb
Instance Method Summary collapse
-
#initialize(body) ⇒ Response
constructor
A new instance of Response.
- #msg ⇒ Object
- #status ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(body) ⇒ Response
Returns a new instance of Response.
183 184 185 186 |
# File 'lib/stathat.rb', line 183 def initialize(body) @body = body @parsed = nil end |
Instance Method Details
#msg ⇒ Object
197 198 199 200 |
# File 'lib/stathat.rb', line 197 def msg parse return @parsed['msg'] end |
#status ⇒ Object
192 193 194 195 |
# File 'lib/stathat.rb', line 192 def status parse return @parsed['status'] end |
#valid? ⇒ Boolean
188 189 190 |
# File 'lib/stathat.rb', line 188 def valid? return status == 200 end |