class Fit::File
Attributes
crc[R]
header[R]
records[R]
Public Class Methods
new()
click to toggle source
# File lib/fit/file.rb, line 10 def initialize @records = [] end
read(io)
click to toggle source
# File lib/fit/file.rb, line 4 def self.read(io) new.read(io) end
Public Instance Methods
read(io)
click to toggle source
# File lib/fit/file.rb, line 14 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