Sha256: 7296ee6259c0cf507d4e38b916e6db90c9409fd32293aa9bf680aa4a0496dcb4

Contents?: true

Size: 391 Bytes

Versions: 14

Compression:

Stored size: 391 Bytes

Contents

module Xdelivery
  module API
    module Response
      class Base
        attr_accessor :response, :data

        def initialize(response)
          self.response = response
          self.data = JSON.parse(response.body)
        end

        def auth?
          response.code == 200
        end

        def status?
          data['status'] == true
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
xdelivery-1.0.1 lib/xdelivery/api/response/base.rb
xdelivery-1.0.0 lib/xdelivery/api/response/base.rb
xdelivery-0.2.4 lib/xdelivery/api/response/base.rb
xdelivery-0.2.3 lib/xdelivery/api/response/base.rb
xdelivery-0.2.2 lib/xdelivery/api/response/base.rb
xdelivery-0.2.1 lib/xdelivery/api/response/base.rb
xdelivery-0.2.0 lib/xdelivery/api/response/base.rb
xdelivery-0.1.6 lib/xdelivery/api/response/base.rb
xdelivery-0.1.5 lib/xdelivery/api/response/base.rb
xdelivery-0.1.4 lib/xdelivery/api/response/base.rb
xdelivery-0.1.3 lib/xdelivery/api/response/base.rb
xdelivery-0.1.2 lib/xdelivery/api/response/base.rb
xdelivery-0.1.1 lib/xdelivery/api/response/base.rb
xdelivery-0.1.0 lib/xdelivery/api/response/base.rb