Sha256: fb8d683449926bd1662dd46df0243d6d23a840296c2267d96d2c4758f361be37

Contents?: true

Size: 488 Bytes

Versions: 8

Compression:

Stored size: 488 Bytes

Contents

module Strava
  module Api
    module Config
      extend self

      ATTRIBUTES = %i[
        endpoint
        access_token
      ].freeze

      attr_accessor(*Config::ATTRIBUTES)

      def reset
        self.endpoint = 'https://www.strava.com/api/v3'
        self.access_token = nil
      end
    end

    class << self
      def configure
        block_given? ? yield(Config) : Config
      end

      def config
        Config
      end
    end
  end
end

Strava::Api::Config.reset

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
strava-ruby-client-0.4.2 lib/strava/api/config.rb
strava-ruby-client-0.4.1 lib/strava/api/config.rb
strava-ruby-client-0.4.0 lib/strava/api/config.rb
strava-ruby-client-0.3.2 lib/strava/api/config.rb
strava-ruby-client-0.3.1 lib/strava/api/config.rb
strava-ruby-client-0.3.0 lib/strava/api/config.rb
strava-ruby-client-0.2.0 lib/strava/api/config.rb
strava-ruby-client-0.1.0 lib/strava/api/config.rb