Class: Broker::Import

Inherits:
Session show all
Defined in:
lib/broker/import.rb

Instance Attribute Summary

Attributes inherited from Session

#app, #client, #ext

Instance Method Summary collapse

Methods inherited from Session

#field_names, #initialize, #qb_ready?, #sign_out

Constructor Details

This class inherits a constructor from Broker::Session

Instance Method Details

#csvObject



13
14
15
# File 'lib/broker/import.rb', line 13

def csv
  @client.importCSVFile(@payload.pkg.file, @payload.pkg.dbid)
end

#fire_event(payload) ⇒ Object



6
7
8
9
10
11
# File 'lib/broker/import.rb', line 6

def fire_event(payload)
  @payload = payload
  if qb_ready?(@payload.pkg.app_key) && respond_to?(ext)
    return send(ext)
  end
end

#txtObject



17
18
19
# File 'lib/broker/import.rb', line 17

def txt
  @client.importTSVFile(@payload.pkg.file, @payload.pkg.dbid)
end