Sha256: 0c97cb0e57436211ca706fd316198b1bce7c73added5599376cb229cbdeefbca

Contents?: true

Size: 227 Bytes

Versions: 1

Compression:

Stored size: 227 Bytes

Contents

require 'json'

module TimeCamp
  class Response
    def initialize(response)
      @response = response
    end

    def to_h
      return @response.body.present? ? JSON.parse(@response.body) : @response.body
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-timecamp-0.0.2 lib/ruby-timecamp/response.rb