Class: ADPDownloader::Runner
- Inherits:
-
Object
- Object
- ADPDownloader::Runner
- Defined in:
- lib/adp-downloader/runner.rb
Instance Method Summary collapse
-
#initialize(arguments) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(arguments) ⇒ Runner
Returns a new instance of Runner.
6 7 8 |
# File 'lib/adp-downloader/runner.rb', line 6 def initialize(arguments) @arguments = arguments end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/adp-downloader/runner.rb', line 10 def run begin downloader = Downloader.new(HttpClient.new) downloader.get_statements('pay', downloader.pay_statements) # FIXME: downloading tax statements requires extra steps :( # downloader.get_statements('tax', downloader.tax_statements) rescue Exception => e path = log_exception_to_file(e) puts "An error ocurred: #{e}" puts "Details were logged to #{path}" exit 1 end end |