Class: Lipseys::User
Instance Method Summary collapse
- #authenticated? ⇒ Boolean
-
#initialize(options = {}) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(options = {}) ⇒ User
Returns a new instance of User.
4 5 6 7 |
# File 'lib/lipseys/user.rb', line 4 def initialize( = {}) requires!(, :email, :password) = end |
Instance Method Details
#authenticated? ⇒ Boolean
9 10 11 12 13 14 15 |
# File 'lib/lipseys/user.rb', line 9 def authenticated? # As an auth check, just try to get invoices with a bogus order number. Lipseys::Invoice.all(.merge(order_number: 'abc')) true rescue Lipseys::NotAuthenticated false end |