class Tyt::RunDetail

Public Class Methods

new(hash = {}) click to toggle source
Calls superclass method
# File lib/tyt/run_detail.rb, line 8
def initialize(hash = {})
  hash[:vertical_feet] = string_to_i(hash[:vertical_feet])
  hash[:vertical_meters] = string_to_i(hash[:vertical_meters])
  super
end

Public Instance Methods

string_to_i(str) click to toggle source
# File lib/tyt/run_detail.rb, line 14
def string_to_i(str)
  if str
    str = str.gsub(',','')
    return str.to_i
  else
    return nil
  end
end