class Strava::Models::Activity

Public Instance Methods

distance_s() click to toggle source
# File lib/strava/models/activity.rb, line 79
def distance_s
  if type == 'Swim'
    distance_in_meters_s
  else
    distance_in_kilometers_s
  end
end
pace_s() click to toggle source
# File lib/strava/models/activity.rb, line 87
def pace_s
  case type
  when 'Swim'
    pace_per_100_meters_s
  else
    pace_per_kilometer_s
  end
end
strava_url() click to toggle source
# File lib/strava/models/activity.rb, line 96
def strava_url
  "https://www.strava.com/activities/#{id}"
end
type_emoji() click to toggle source
# File lib/strava/models/activity.rb, line 100
def type_emoji
  case type
  when 'Run' then 'πŸƒ'
  when 'Ride' then '🚴'
  when 'Swim' then '🏊'
  when 'Walk' then '🚢'
  when 'AlpineSki' then '⛷️'
  when 'BackcountrySki' then '🎿️'
  # when 'Canoeing' then ''
  # when 'Crossfit' then ''
  when 'EBikeRide' then '🚴'
  # when 'Elliptical' then ''
  # when 'Hike' then ''
  when 'IceSkate' then '⛸️'
  # when 'InlineSkate' then ''
  # when 'Kayaking' then ''
  # when 'Kitesurf' then ''
  # when 'NordicSki' then ''
  when 'RockClimbing' then 'πŸ§—'
  when 'RollerSki' then ''
  when 'Rowing' then '🚣'
  when 'Snowboard' then 'πŸ‚'
  # when 'Snowshoe' then ''
  # when 'StairStepper' then ''
  # when 'StandUpPaddling' then ''
  when 'Surfing' then 'πŸ„'
  when 'VirtualRide' then '🚴'
  when 'VirtualRun' then 'πŸƒ'
  when 'WeightTraining' then 'πŸ‹οΈ'
  # when 'Windsurf' then ''
  when 'Wheelchair' then 'β™Ώ'
    # when 'Workout' then ''
    # when 'Yoga'' then ''
  end
end