lib/broker/import.rb in broker-0.0.9 vs lib/broker/import.rb in broker-0.1.1

- old
+ new

@@ -1,11 +1,22 @@ -require 'broker' -require 'broker/client/quickbase_client' +require 'broker/session' module Broker - class Import - - - + class Import < Broker::Session + + def fire_event(payload) + @payload = payload + if qb_ready?(@payload.pkg.app_key) && respond_to?(ext) + return send(ext) + end + end + def csv + @client.importCSVFile(@payload.pkg.file, @payload.pkg.dbid) + end + + def txt + @client.importTSVFile(@payload.pkg.file, @payload.pkg.dbid) + end + end end \ No newline at end of file