Class: Freeagent::User

Inherits:
Base
  • Object
show all
Defined in:
lib/freeagent_api.rb

Overview

Users

Class Method Summary collapse

Methods inherited from Base

authenticate

Class Method Details

.find_by_email(email) ⇒ Object

Raises:



120
121
122
123
124
125
126
# File 'lib/freeagent_api.rb', line 120

def self.find_by_email(email)
  users = User.find :all
  users.each do |u|
    u.email == email ? (return u) : next
  end
  raise Error, "No user matches that email!"
end