Sha256: e9c7e3f69af1a6b3a10903016373cd36aca8b12ca680984726fbd45e21ac10d5
Contents?: true
Size: 836 Bytes
Versions: 5
Compression:
Stored size: 836 Bytes
Contents
module Strava module Models module Mixins module Elevation extend ActiveSupport::Concern included do property 'total_elevation_gain' end def total_elevation_gain_in_feet total_elevation_gain * 3.28084 end def total_elevation_gain_in_meters total_elevation_gain end def total_elevation_gain_in_meters_s return if total_elevation_gain.nil? format('%gm', format('%.1f', total_elevation_gain_in_meters)) end def total_elevation_gain_in_feet_s return if total_elevation_gain.nil? format('%gft', format('%.1f', total_elevation_gain_in_feet)) end def total_elevation_gain_s total_elevation_gain_in_meters_s end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems