lib/train.rb in ierail-0.3.5 vs lib/train.rb in ierail-0.4.0

- old
+ new

@@ -1,13 +1,13 @@ class Train attr_reader :status, :code, :date, :message, :direction def initialize hash @status = hash['TrainStatus'] - @longitude = hash['TrainLongitude'] - @latitude = hash['TrainLatitude'] + @longitude = hash['TrainLongitude'].to_f + @latitude = hash['TrainLatitude'].to_f @code = hash['TrainCode'] - @date = hash['TrainDate'] + @date = Date.parse hash['TrainDate'] @message = hash['PublicMessage'] @direction = hash['Direction'] end def location