Sha256: d8a292581ad20c74f7e174330365d3e5bce23dfa9ec134cbae84680c28151133
Contents?: true
Size: 498 Bytes
Versions: 20
Compression:
Stored size: 498 Bytes
Contents
require 'backlog_kit/resource' module BacklogKit class Response attr_reader(:headers, :status, :body) def initialize(response) @headers = process(response.headers) @status = process(response.status) @body = process(response.body) end private def process(raw) case raw when Hash then Resource.new(raw) when Array then raw.map { |hash| process(hash) } when String then Resource.new else raw end end end end
Version data entries
20 entries across 20 versions & 1 rubygems