Sha256: 166a574f0edd4a5f28f690bb844b5d8b0692247916291044d7dee145b03e4fcd

Contents?: true

Size: 547 Bytes

Versions: 2

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://api.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

2 entries across 2 versions & 1 rubygems

Version Path
strava-ruby-client-0.3.1 lib/strava/webhooks/config.rb
strava-ruby-client-0.3.0 lib/strava/webhooks/config.rb