Module: Joule

Defined in:
lib/joule.rb,
lib/joule/csv.rb,
lib/joule/srm.rb,
lib/joule/tcx.rb,
lib/joule/marker.rb,
lib/joule/workout.rb,
lib/joule/hashable.rb,
lib/joule/csv/parser.rb,
lib/joule/data_point.rb,
lib/joule/peak_power.rb,
lib/joule/srm/parser.rb,
lib/joule/tcx/parser.rb,
lib/joule/base/parser.rb,
lib/joule/ibike/parser.rb,
lib/joule/srm/properties.rb,
lib/joule/tcx/properties.rb,
lib/joule/powertap/parser.rb,
lib/joule/ibike/properties.rb,
lib/joule/units_conversion.rb,
lib/joule/powertap/properties.rb,
lib/joule/calculator/power_calculator.rb,
lib/joule/calculator/marker_calculator.rb,
lib/joule/calculator/peak_power_calculator.rb

Defined Under Namespace

Modules: Base, CSV, Calculator, Hashable, IBike, PowerTap, SRM, TCX, UnitsConversion Classes: DataPoint, Marker, PeakPower, Workout

Class Method Summary collapse

Class Method Details

.parser(extension, data) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/joule.rb', line 21

def Joule.parser(extension, data) 
  if(Joule::SRM::is_srm_file(extension))
    Joule::SRM::Parser.new(data)
  elsif(Joule::TCX::is_tcx_file(extension))
    Joule::TCX::Parser.new(data)
  elsif(Joule::CSV::is_csv_file(extension))
    Joule::CSV.parser(extension, data)      
  else
    raise UnsupportedFileTypeException
  end
end