lib/strava/models/mixins/http_response.rb in strava-ruby-client-1.0.0 vs lib/strava/models/mixins/http_response.rb in strava-ruby-client-1.0.1

- old
+ new

@@ -5,10 +5,19 @@ module Mixins module HttpResponse extend ActiveSupport::Concern included do - property 'http_response', transform_with: ->(v) { Strava::Web::ApiResponse.new(v) } + 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