Class: Quarry::Binary

Inherits:
Object
  • Object
show all
Defined in:
lib/quarry_rb/storage/binary.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Binary

Returns a new instance of Binary.



3
4
5
# File 'lib/quarry_rb/storage/binary.rb', line 3

def initialize(path)
  @binary = Quarry::ImplBinary.new(path)
end

Instance Method Details

#readObject



7
8
9
# File 'lib/quarry_rb/storage/binary.rb', line 7

def read
  Quarry::DataSet::DataSet.new(@binary.read)
end

#read_modelObject



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