Class: Ubiquitously::Faves::User
- Inherits:
-
Base::User
- Object
- Base::User
- Ubiquitously::Faves::User
- Defined in:
- lib/ubiquitously/faves.rb
Instance Attribute Summary
Attributes inherited from Base::User
Instance Method Summary collapse
Methods inherited from Base::User
Methods included from Resourceful
Constructor Details
This class inherits a constructor from Ubiquitously::Base::User
Instance Method Details
#login ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ubiquitously/faves.rb', line 4 def login page = agent.get("https://secure.faves.com/signIn") form = page.forms.detect {|form| form.form_node["id"] == "signInBox"} form["rUsername"] = username form["rPassword"] = password page = form.submit @logged_in = (page.title =~ /Sign In/i).nil? unless @logged_in raise AuthenticationError.new("Invalid username or password for #{service_name.titleize}") end @logged_in end |