Sha256: 2ba41c0fe7405b46e4ea82414d41cf44ff1c003d18381b1ce27eedd1cf1784e9
Contents?: true
Size: 524 Bytes
Versions: 4
Compression:
Stored size: 524 Bytes
Contents
require 'active_support/ordered_options' require 'forwardable' require 'delegate' require 'json' module Kraken class Response < SimpleDelegator extend Forwardable def_delegators :@parsed, :success, :file_name, :original_size, :kraked_size, :saved_bytes, :kraked_url, :id, :message def initialize(response) super(response) @parsed = ActiveSupport::InheritableOptions.new(JSON.parse(response.body).with_indifferent_access) end alias_method :original_response, :__getobj__ end end
Version data entries
4 entries across 3 versions & 2 rubygems