Sha256: c10d91f8714483a8db3f701f5941fd2c18812c1d8f880b8e2e61a4d64337a434

Contents?: true

Size: 386 Bytes

Versions: 4

Compression:

Stored size: 386 Bytes

Contents

module Fit
  class File

    def self.read(io)
      new.read(io)
    end

    attr_reader :header, :records, :crc

    def initialize
      @records = []
    end

    def read(io)
      @header = Header.read(io)

      Record.clear_definitions!

      while io.pos < @header.end_pos
        @records << Record.read(io)
      end

      @crc = io.read(2)

      self
    end

  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fit-parser-0.0.3 lib/fit/file.rb
fit-parser-0.0.2 lib/fit/file.rb
fit-parser-0.0.1 lib/fit/file.rb
garmin-fit-0.0.2 lib/fit/file.rb