Module: Strava::Models::Mixins::SportType
- Extended by:
- ActiveSupport::Concern
- Included in:
- ClubActivity, DetailedActivity, SummaryActivity
- Defined in:
- lib/strava/models/mixins/sport_type.rb
Instance Method Summary collapse
Instance Method Details
#distance_s ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/strava/models/mixins/sport_type.rb', line 14 def distance_s if sport_type == 'Swim' distance_in_meters_s else distance_in_kilometers_s end end |
#pace_s ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/strava/models/mixins/sport_type.rb', line 22 def pace_s case sport_type when 'Swim' pace_per_100_meters_s else pace_per_kilometer_s end end |
#sport_type_emoji ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/strava/models/mixins/sport_type.rb', line 31 def sport_type_emoji case sport_type when 'AlpineSki' then '⛷️' when 'BackcountrySki' then '🎿️' # when "Canoeing" then '' # when "Crossfit" then '' # when "Elliptical" then '' when 'Golf' then '🏌️' # when "Handcycle" then '' when 'Hike' then '🥾' when 'IceSkate' then '⛸' when 'InlineSkate' then "\u{1F6FC}" # when "Kayaking" then '' # when "Kitesurf" then '' when 'MountainBikeRide', 'EMountainBikeRide' then '🚵' # when "NordicSki" then '' when 'Ride', 'EBikeRide', 'VirtualRide', 'GravelRide' then '🚴' when 'RockClimbing' then '🧗' # when 'RollerSki' then '' when 'Rowing' then '🚣' when 'Run', 'VirtualRun', 'TrailRun' then '🏃' when 'Sail' then '⛵️' when 'Skateboard' then '🛹' when 'Snowboard' then '🏂' # when 'Snowshoe' then '' when 'Soccer' then '⚽️' # when 'StairStepper' then '' # when 'StandUpPaddling' then '' when 'Surfing' then '🏄' when 'Swim' then '🏊' # when 'Velomobile' then '' when 'Walk' then '🚶' when 'WeightTraining' then '🏋️' when 'Wheelchair' then '♿' # when 'Windsurf' then '' # when 'Workout' then '' when 'Yoga' then '🧘' end end |