Sha256: 1ec18be21b358495318735dbb98e7d07743c69afc60797e1b0c2bcecc417ac5e

Contents?: true

Size: 448 Bytes

Versions: 5

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

module Strava
  module Models
    module Mixins
      module HttpResponse
        extend ActiveSupport::Concern

        included do
          attr_reader :input

          def initialize(obj)
            @input = obj
            super
          end

          def http_response
            @http_response ||= Strava::Web::ApiResponse.new(input['http_response'])
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
strava-ruby-client-2.2.0 lib/strava/models/mixins/http_response.rb
strava-ruby-client-2.1.0 lib/strava/models/mixins/http_response.rb
strava-ruby-client-2.0.0 lib/strava/models/mixins/http_response.rb
strava-ruby-client-1.1.0 lib/strava/models/mixins/http_response.rb
strava-ruby-client-1.0.1 lib/strava/models/mixins/http_response.rb