class ARBookFinder::PaginationProcessor

Constants

COLLECTION_GOTO_FIELD
COLLECTION_SUBMIT_BUTTON
SEARCH_GOTO_FIELD
SEARCH_SUBMIT_BUTTON

Public Class Methods

new(page, collection = false) click to toggle source
# File lib/ar_book_finder/pagination_processor.rb, line 11
def initialize(page, collection = false)
  @page = page
  @field_const = collection ? :COLLECTION : :SEARCH
end

Public Instance Methods

process() click to toggle source
# File lib/ar_book_finder/pagination_processor.rb, line 16
def process
  fill_in(self.class.const_get(:"#{@field_const}_GOTO_FIELD"), with: @page)
  click_button(self.class.const_get(:"#{@field_const}_SUBMIT_BUTTON"))
end