Sha256: 2eb4a83738a56fed4c25be29de7c4cd8d24b815e56bad21d57f6cf13cd2f7c96
Contents?: true
Size: 306 Bytes
Versions: 4
Compression:
Stored size: 306 Bytes
Contents
require 'json' module Marver module API class Response attr_reader :code, :status, :data, :results def initialize(raw_json) json = JSON.parse(raw_json) @code = json['code'].to_i @status = json['status'] @data = json['data'] end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
marver-0.1.0 | lib/marver/api/response.rb |
marver-0.0.6 | lib/marver/api/response.rb |
marver-0.0.5 | lib/marver/api/response.rb |
marver-0.0.4 | lib/marver/api/response.rb |