Sha256: 34c2fe4d33368dcefe2dea13914613991b381524839862c44f1f0b9f7e727c3f

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

module FitParser
  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 & 1 rubygems

Version Path
fit_parser-0.0.5 lib/fit_parser/file.rb
fit_parser-0.0.4 lib/fit_parser/file.rb
fit_parser-0.0.2 lib/fit_parser/file.rb
fit_parser-0.0.1 lib/fit_parser/file.rb