class Tyt::SkiDay
Public Class Methods
new(hash = {})
click to toggle source
Calls superclass method
# File lib/tyt/ski_day.rb, line 8 def initialize(hash = {}) hash[:vertical_feet] = string_to_i(hash[:vertical_feet]) hash[:runs] = string_to_i(hash[:runs]) 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/ski_day.rb, line 15 def string_to_i(str) if str str = str.gsub(',','') return str.to_i else return nil end end