class BomDB::Export::Base
Attributes
db[R]
opts[R]
Public Class Methods
new(db, **opts)
click to toggle source
# File lib/bomdb/export/base.rb, line 6 def initialize(db, **opts) @db = db @opts = opts end
Public Instance Methods
export(format: 'json', **options)
click to toggle source
# File lib/bomdb/export/base.rb, line 11 def export(format: 'json', **options) case format when 'json' then export_json when 'text' then export_text else return Import::Result.new( success: false, error: "Unknown format: #{format}" ) end end