Module: Inscriber

Defined in:
lib/inscriber.rb,
lib/inscriber/config.rb,
lib/inscriber/version.rb,
lib/inscriber/database.rb,
lib/inscriber/exporter.rb,
lib/inscriber/inserter.rb,
lib/inscriber/uploader.rb,
lib/inscriber/downloader.rb,
lib/inscriber/table_helper.rb,
lib/inscriber/connection_string.rb

Defined Under Namespace

Modules: TableHelpers Classes: Config, ConnectionString, Database, Downloader, Exporter, Inserter, Uploader

Constant Summary collapse

VERSION =
'0.2.1'

Class Method Summary collapse

Class Method Details

.exportObject



12
13
14
15
16
17
18
19
20
# File 'lib/inscriber.rb', line 12

def export 
  begin
    @config ||= Inscriber::Config.data
    @database ||= Inscriber::Database.new(@config)
    Inscriber::Exporter.export(@database)
  rescue => e
    { status: false, error: e }
  end
end

.insertObject



22
23
24
25
26
27
28
29
30
# File 'lib/inscriber.rb', line 22

def insert
  begin
    @config ||= Inscriber::Config.data
    @database ||= Inscriber::Database.new(@config)
    Inscriber::Inserter.insert(@database)
  rescue => e
    { status: false, error: e }
  end
end