Class: Quarry::Binary
- Inherits:
-
Object
- Object
- Quarry::Binary
- Defined in:
- lib/quarry_rb/storage/binary.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ Binary
constructor
A new instance of Binary.
- #read ⇒ Object
- #read_model ⇒ Object
- #write(data_set) ⇒ Object
- #write_model(model) ⇒ Object
Constructor Details
Instance Method Details
#read ⇒ Object
7 8 9 |
# File 'lib/quarry_rb/storage/binary.rb', line 7 def read Quarry::DataSet::DataSet.new(@binary.read) end |
#read_model ⇒ Object
15 16 17 |
# File 'lib/quarry_rb/storage/binary.rb', line 15 def read_model Quarry::Model.new(@binary.read_model) end |
#write(data_set) ⇒ Object
11 12 13 |
# File 'lib/quarry_rb/storage/binary.rb', line 11 def write(data_set) @binary.write(data_set.data_set) end |
#write_model(model) ⇒ Object
19 20 21 |
# File 'lib/quarry_rb/storage/binary.rb', line 19 def write_model(model) @binary.write_model(model.model) end |