Class: FlattenDB::MDB

Inherits:
Base
  • Object
show all
Defined in:
lib/flattendb/types/mdb.rb

Constant Summary

Constants inherited from Base

Base::BUILDER_OPTIONS, Base::ELEMENT_CHARS, Base::ELEMENT_START

Instance Attribute Summary

Attributes inherited from Base

#config, #input, #output, #root

Instance Method Summary collapse

Methods inherited from Base

[], to_flat!, types

Constructor Details

#initialize(options) ⇒ MDB

Returns a new instance of MDB.



39
40
41
42
# File 'lib/flattendb/types/mdb.rb', line 39

def initialize(options)
  super
  parse
end

Instance Method Details

#flatten!(options = {}) ⇒ Object



55
56
57
# File 'lib/flattendb/types/mdb.rb', line 55

def flatten!(options = {})
  self
end

#parseObject



44
45
46
47
48
49
50
51
52
53
# File 'lib/flattendb/types/mdb.rb', line 44

def parse
  tables_cmd, export_cmd = 'mdb-tables', 'mdb-export'

  [tables_cmd, export_cmd].each { |cmd|
    next if File.which(cmd)
    abort "Command not found: #{cmd}! Please install `mdbtools' first."
  }

  # ...
end

#to_xml(output = output, builder_options = {}) ⇒ Object



59
60
61
# File 'lib/flattendb/types/mdb.rb', line 59

def to_xml(output = output, builder_options = {})
  self
end