class DbMeta::DbMeta
Public Class Methods
new(args = {})
click to toggle source
# File lib/db_meta.rb, line 14 def initialize(args = {}) @database_type = args[:database_type] || DATABASE_TYPES[0] raise "allowed database types are [#{DATABASE_TYPES.join(", ")}], but provided was [#{@database_type}]" unless DATABASE_TYPES.include?(@database_type) @abstract = Abstract.from_type(@database_type, args) end
Public Instance Methods
extract(args = {})
click to toggle source
# File lib/db_meta.rb, line 28 def extract(args = {}) Log.info("Extracting...") @abstract.extract(args) Log.info("Extraction completed") rescue => e Log.error(e.to_s) Log.error(e.backtrace.join("\n")) end
fetch(args = {})
click to toggle source
# File lib/db_meta.rb, line 20 def fetch(args = {}) Log.info("Fetching...") @abstract.fetch(args) Log.info("Fetch completed") rescue => e Log.error(e.backtrace.join("\n")) end