Class: FineAnts::Adapters::Purduefed
- Inherits:
-
Object
- Object
- FineAnts::Adapters::Purduefed
- Defined in:
- lib/fine_ants/adapters/purduefed.rb
Instance Method Summary collapse
- #download ⇒ Object
-
#initialize(credentials) ⇒ Purduefed
constructor
A new instance of Purduefed.
- #login ⇒ Object
Constructor Details
#initialize(credentials) ⇒ Purduefed
Returns a new instance of Purduefed.
6 7 8 9 |
# File 'lib/fine_ants/adapters/purduefed.rb', line 6 def initialize(credentials) @user = credentials[:user] @password = credentials[:password] end |
Instance Method Details
#download ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fine_ants/adapters/purduefed.rb', line 19 def download deposit_table = find("span", text: /Deposit Accounts/) .find(:xpath, "../..") .find(".module_container") loan_table = find("span", text: /Loans/) .find(:xpath, "../..") .find(".module_container") deposit_transactions = process_table(deposit_table) loan_transactions = process_table(loan_table, type: :loan) deposit_transactions + loan_transactions end |
#login ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/fine_ants/adapters/purduefed.rb', line 11 def login visit "https://www.purduefed.com" fill_in "USERNAME", with: @user "Login" fill_in "M_content_PCDZ_MF3KFEF_ctl00_Password", with: @password "Sign in" end |