Sha256: ba74d0885b97471557328026449b90c88d9e6117efc80c422863e93446da18b7
Contents?: true
Size: 282 Bytes
Versions: 3
Compression:
Stored size: 282 Bytes
Contents
module GetResponse class Response def initialize(response) @response = response end def body JSON.parse(@response.body) rescue JSON::ParserError => e {} end def success? [200, 201, 202].include? @response.status end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
get_response-0.1.1 | lib/get_response/response.rb |
get_response-0.1.0 | lib/get_response/response.rb |
getresponse_ruby-0.1.0 | lib/get_response/response.rb |