Class: Fit::File
- Inherits:
-
Object
- Object
- Fit::File
- Defined in:
- lib/fit/file.rb,
lib/fit/file/data.rb,
lib/fit/file/header.rb,
lib/fit/file/record.rb,
lib/fit/file/definition.rb,
lib/fit/file/definitions.rb,
lib/fit/file/record_header.rb
Defined Under Namespace
Modules: Definitions Classes: Data, Definition, Header, Record, RecordHeader
Instance Attribute Summary collapse
-
#crc ⇒ Object
readonly
Returns the value of attribute crc.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#records ⇒ Object
readonly
Returns the value of attribute records.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ File
constructor
A new instance of File.
- #read(io) ⇒ Object
Constructor Details
#initialize ⇒ File
Returns a new instance of File.
10 11 12 |
# File 'lib/fit/file.rb', line 10 def initialize @records = [] end |
Instance Attribute Details
#crc ⇒ Object (readonly)
Returns the value of attribute crc.
8 9 10 |
# File 'lib/fit/file.rb', line 8 def crc @crc end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
8 9 10 |
# File 'lib/fit/file.rb', line 8 def header @header end |
#records ⇒ Object (readonly)
Returns the value of attribute records.
8 9 10 |
# File 'lib/fit/file.rb', line 8 def records @records end |
Class Method Details
.read(io) ⇒ Object
4 5 6 |
# File 'lib/fit/file.rb', line 4 def self.read(io) new.read(io) end |