Sha256: 248c0904371bfc296d12619df578144e3f4d224cbf40af24d262f7fbe3a9e723
Contents?: true
Size: 867 Bytes
Versions: 7
Compression:
Stored size: 867 Bytes
Contents
# frozen_string_literal: true 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
7 entries across 7 versions & 1 rubygems