Class: ARBookFinder::PaginationProcessor
- Inherits:
-
Object
- Object
- ARBookFinder::PaginationProcessor
- Includes:
- Capybara::DSL
- Defined in:
- lib/ar_book_finder/pagination_processor.rb
Constant Summary collapse
- SEARCH_GOTO_FIELD =
'ctl00_ContentPlaceHolder1_ucSeachResults_txtPageToGoToTop'
- SEARCH_SUBMIT_BUTTON =
'ctl00_ContentPlaceHolder1_ucSeachResults_btnGoToPageTop'
- COLLECTION_GOTO_FIELD =
'ctl00_ContentPlaceHolder1_ucCollection_ucSeachResults_txtPageToGoToTop'
- COLLECTION_SUBMIT_BUTTON =
'ctl00_ContentPlaceHolder1_ucCollection_ucSeachResults_btnGoToPageTop'
Instance Method Summary collapse
-
#initialize(page, collection = false) ⇒ PaginationProcessor
constructor
A new instance of PaginationProcessor.
- #process ⇒ Object
Constructor Details
#initialize(page, collection = false) ⇒ PaginationProcessor
Returns a new instance of PaginationProcessor.
11 12 13 14 |
# File 'lib/ar_book_finder/pagination_processor.rb', line 11 def initialize(page, collection = false) @page = page @field_const = collection ? :COLLECTION : :SEARCH end |
Instance Method Details
#process ⇒ Object
16 17 18 19 |
# File 'lib/ar_book_finder/pagination_processor.rb', line 16 def process fill_in(self.class.const_get(:"#{@field_const}_GOTO_FIELD"), with: @page) (self.class.const_get(:"#{@field_const}_SUBMIT_BUTTON")) end |