Sha256: 318d6bc3460d321eca8dd93580616e4b5141915e7c7966e90acee44eb410b2f4

Contents?: true

Size: 547 Bytes

Versions: 4

Compression:

Stored size: 547 Bytes

Contents

module Strava
  module Webhooks
    module Config
      extend self

      ATTRIBUTES = %i[
        endpoint
        client_id
        client_secret
      ].freeze

      attr_accessor(*Config::ATTRIBUTES)

      def reset
        self.endpoint = 'https://www.strava.com/api/v3'
        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::Webhooks::Config.reset

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
strava-ruby-client-0.4.2 lib/strava/webhooks/config.rb
strava-ruby-client-0.4.1 lib/strava/webhooks/config.rb
strava-ruby-client-0.4.0 lib/strava/webhooks/config.rb
strava-ruby-client-0.3.2 lib/strava/webhooks/config.rb