Class: DubbletrackRemote::Reader::DBF

Inherits:
Base
  • Object
show all
Defined in:
lib/dubbletrack_remote/reader/dbf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#ingest, #items, #tracks, #traffic

Constructor Details

#initialize(file_path, cuts_path: nil, use_database: true) ⇒ DBF

Returns a new instance of DBF.



7
8
9
10
11
12
13
14
15
16
# File 'lib/dubbletrack_remote/reader/dbf.rb', line 7

def initialize(file_path, cuts_path: nil, use_database: true)
  raise "cuts not found at #{cuts_path}" unless File.exist?(cuts_path)
  raise "db not found at #{file_path}" unless File.exist?(file_path)

  @file_path = file_path
  @automation_system = "enco"
  @db = ::DBF::Table.new(File.open(file_path))
  @cuts = ::DBF::Table.new(File.open(cuts_path))
  @use_database = use_database
end

Instance Attribute Details

#use_databaseObject (readonly)

Returns the value of attribute use_database.



5
6
7
# File 'lib/dubbletrack_remote/reader/dbf.rb', line 5

def use_database
  @use_database
end