Sha256: be7cfbdc904ba1dd9da341aa4fea0f6f1a56af74b8b69bb60d7c8aabc52504cb
Contents?: true
Size: 443 Bytes
Versions: 1
Compression:
Stored size: 443 Bytes
Contents
module Workarea module Affirm class Response def initialize(response) @response = response end def success? @response.present? && (@response.status == 201 || @response.status == 200) end def body return {} unless @response.body.present? && @response.body != "null" JSON.parse(@response.body) end def status @response.status end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
workarea-affirm-1.0.0 | lib/workarea/affirm/response.rb |