Module: TodaysPlan

Defined in:
lib/todays_plan.rb,
lib/todays_plan/user.rb,
lib/todays_plan/client.rb,
lib/todays_plan/errors.rb,
lib/todays_plan/version.rb,
lib/todays_plan/activity.rb,
lib/todays_plan/connector.rb,
lib/todays_plan/activity/power.rb,
lib/todays_plan/activity/summary.rb,
lib/todays_plan/activity/heartrate.rb

Defined Under Namespace

Classes: Activity, BadRequestError, Client, Connector, NotConfiguredError, NotFoundError, RequestFailedError, ServerError, TodaysPlanError, UnauthorizedError, User

Constant Summary collapse

VERSION =
'0.5.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.debugObject

Returns the value of attribute debug.



15
16
17
# File 'lib/todays_plan.rb', line 15

def debug
  @debug
end

.endpointObject

set default endpoint



28
29
30
# File 'lib/todays_plan.rb', line 28

def endpoint
  @endpoint
end

.loggerObject

set default logger



38
39
40
# File 'lib/todays_plan.rb', line 38

def logger
  @logger
end

.passwordObject

Returns the value of attribute password.



15
16
17
# File 'lib/todays_plan.rb', line 15

def password
  @password
end

.timeoutObject

set default timeout



33
34
35
# File 'lib/todays_plan.rb', line 33

def timeout
  @timeout
end

.usernameObject

Returns the value of attribute username.



15
16
17
# File 'lib/todays_plan.rb', line 15

def username
  @username
end

Class Method Details

.configure(&block) ⇒ Object

Raises:

  • (ArgumentError)


22
23
24
25
# File 'lib/todays_plan.rb', line 22

def configure(&block)
  raise ArgumentError, "must provide a block" unless block_given?
  block.arity.zero? ? instance_eval(&block) : yield(self)
end