class Strava::Web::Client
Public Class Methods
config()
click to toggle source
# File lib/strava/web/client.rb, line 25 def config Config end
configure() { |Config| ... }
click to toggle source
# File lib/strava/web/client.rb, line 21 def configure block_given? ? yield(Config) : Config end
new(options = {})
click to toggle source
# File lib/strava/web/client.rb, line 9 def initialize(options = {}) Strava::Web::Config::ATTRIBUTES.each do |key| send("#{key}=", options[key] || Strava::Web.config.send(key)) end @logger ||= Strava::Logger.logger end
Public Instance Methods
endpoint()
click to toggle source
# File lib/strava/web/client.rb, line 16 def endpoint raise NotImplementedError end
parse_args(id_or_options, options = {})
click to toggle source
# File lib/strava/web/client.rb, line 30 def parse_args(id_or_options, options = {}) if id_or_options.is_a?(Hash) throw ArgumentError.new('Required argument :id missing') if id_or_options[:id].nil? [id_or_options[:id], id_or_options.except(:id)] else throw ArgumentError.new('Required argument :id missing') if id_or_options.nil? [id_or_options, options] end end