Sha256: 8573619089f20a22146af8d110ec57237a4fffbe1f32139f59c57d6205934974

Contents?: true

Size: 369 Bytes

Versions: 4

Compression:

Stored size: 369 Bytes

Contents

require 'importer/garmin'
require 'importer/polar'

module Importer
  def Importer.file_type(name)
    if name =~ /\.tcx$/i
      "GARMIN_XML" 
    elsif name =~ /\.hrm$/i
      "POLAR_HRM"
    end
  end
  
  def Importer.read_in_file(name)
    if File.readable?(name)
      return open(name, "r")
    else 
      puts "FILE ERROR, can't read #{name}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
teich-hrmparser-0.2.1 lib/hrmparser/importer.rb
teich-hrmparser-0.2.2 lib/hrmparser/importer.rb
teich-hrmparser-0.3.0 lib/hrmparser/importer.rb
teich-hrmparser-0.3.1 lib/hrmparser/importer.rb