From bce2634d2a5c7a4b1b27c2dbccc88ac39d6b548b Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 27 Jul 2015 19:36:24 -0400 Subject: [PATCH] remove old safety deposit class --- app/models/safety_deposit_page.rb | 39 ------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 app/models/safety_deposit_page.rb diff --git a/app/models/safety_deposit_page.rb b/app/models/safety_deposit_page.rb deleted file mode 100644 index ccf16526..00000000 --- a/app/models/safety_deposit_page.rb +++ /dev/null @@ -1,39 +0,0 @@ -class SafetyDepositPage < ClosetPage - @selectors = { - :items => "#content tr[bgcolor=\"#DFEAF7\"]", - :item_thumbnail => "img", - :item_name => "td:nth-child(2)", - :item_quantity => "td:nth-child(5)", - :item_remove => "input", - :page_select => "select[name=offset]", - :selected => "option[selected]" - } - - def name - I18n.translate('neopets_pages.names.safety_deposit') - end - - def url - "http://www.neopets.com/safetydeposit.phtml?offset=#{offset}" - end - - protected - - REMOVE_NAME_REGEX = /\[([0-9]+)\]/ - def find_id(*args) - name = super - unless match = name.match(REMOVE_NAME_REGEX) - raise ParseError, "Remove Item input name format was unexpected: #{name}.inspect" - end - match[1] - end - - def find_index(*args) - (super / 30) + 1 - end - - def offset - @index ? (@index.to_i - 1) * 30 : 0 - end -end -