Sha256: 1e0b1d93f8042d103427199194378c2179fdff921d4dac903d871f33c30f820f

Contents?: true

Size: 219 Bytes

Versions: 5

Compression:

Stored size: 219 Bytes

Contents

require 'oj'
module Shydra
  module Response
    def data
      json = Oj.load(response_body)
      case response_code
      when 200
        json[request.data_root]
      else
        json
      end
    end
  end
end
 

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shydra-0.4.2 lib/shydra/response.rb
shydra-0.1.2 lib/shydra/response.rb
shydra-0.1.1 lib/shydra/response.rb
shydra-0.1.0 lib/shydra/response.rb
shydra-0.0.1 lib/shydra/response.rb