class FeideeUtils::Kbf
Constants
- DatabaseName
Attributes
db[R]
zipfile[R]
Public Class Methods
new(input_stream)
click to toggle source
# File lib/feidee_utils/kbf.rb, line 14 def initialize(input_stream) Zip::File.open_buffer(input_stream) do |zipfile| zipfile.each do |entry| if entry.name == DatabaseName # Each call to get_input_stream will create a new stream @original_sqlite_db_entry = entry @db = FeideeUtils::Database.new(entry.get_input_stream, true) end end end end
open_file(file_name)
click to toggle source
# File lib/feidee_utils/kbf.rb, line 34 def open_file(file_name) return Kbf.new(File.open(file_name)) end
Public Instance Methods
extract_original_sqlite(dest_file_path = nil)
click to toggle source
# File lib/feidee_utils/kbf.rb, line 26 def extract_original_sqlite(dest_file_path = nil) FeideeUtils::Database.feidee_to_sqlite( @original_sqlite_db_entry.get_input_stream, dest_file_path ) end