Class: DubbletrackRemote::Reader::DBF
- Defined in:
- lib/dubbletrack_remote/reader/dbf.rb
Instance Attribute Summary collapse
-
#use_database ⇒ Object
readonly
Returns the value of attribute use_database.
Instance Method Summary collapse
-
#initialize(file_path, cuts_path: nil, use_database: true) ⇒ DBF
constructor
A new instance of DBF.
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_database ⇒ Object (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 |