Class: ARBookFinder::UserTypeProcessor
- Inherits:
-
Object
- Object
- ARBookFinder::UserTypeProcessor
- Includes:
- Capybara::DSL
- Defined in:
- lib/ar_book_finder/user_type_processor.rb
Constant Summary collapse
- USER_TYPE_URL =
"#{ARBookFinder::BASE_URL}/usertype.aspx"
- USER_TYPES =
{ student: 'Student', parent: 'Parent', teacher: 'Teacher', librarian: 'Librarian' }
Instance Method Summary collapse
-
#initialize(user_type) ⇒ UserTypeProcessor
constructor
A new instance of UserTypeProcessor.
- #process ⇒ Object
Constructor Details
#initialize(user_type) ⇒ UserTypeProcessor
Returns a new instance of UserTypeProcessor.
14 15 16 |
# File 'lib/ar_book_finder/user_type_processor.rb', line 14 def initialize(user_type) @user_type = USER_TYPES[user_type] end |
Instance Method Details
#process ⇒ Object
18 19 20 21 22 |
# File 'lib/ar_book_finder/user_type_processor.rb', line 18 def process visit(USER_TYPE_URL) choose(@user_type) ('Submit') end |