Sha256: 4cd4586f4a617f5f0045880e8899892cbe958d735393b397ba13ab9779e52f36

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

module Strava
  module OAuth
    module Config
      extend self

      ATTRIBUTES = %i[
        endpoint
        client_id
        client_secret
      ].freeze

      attr_accessor(*Config::ATTRIBUTES)

      def reset
        self.endpoint = 'https://www.strava.com/oauth'
        self.client_id = nil
        self.client_secret = nil
      end
    end

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

      def config
        Config
      end
    end
  end
end

Strava::OAuth::Config.reset

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
strava-ruby-client-2.2.0 lib/strava/oauth/config.rb
strava-ruby-client-2.1.0 lib/strava/oauth/config.rb
strava-ruby-client-2.0.0 lib/strava/oauth/config.rb
strava-ruby-client-1.1.0 lib/strava/oauth/config.rb
strava-ruby-client-1.0.1 lib/strava/oauth/config.rb
strava-ruby-client-1.0.0 lib/strava/oauth/config.rb
strava-ruby-client-0.4.3 lib/strava/oauth/config.rb