Class: Gattica::User
- Inherits:
-
Object
- Object
- Gattica::User
- Includes:
- Convertible
- Defined in:
- lib/gattica/user.rb
Overview
Represents a user to be authenticated by GA
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(email, password) ⇒ User
constructor
A new instance of User.
-
#to_h ⇒ Object
User gets a special
to_h
because Google expectsEmail
andPasswd
instead of our nicer internal names.
Methods included from Convertible
Constructor Details
#initialize(email, password) ⇒ User
Returns a new instance of User.
11 12 13 14 15 |
# File 'lib/gattica/user.rb', line 11 def initialize(email,password) @email = email @password = password validate end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
9 10 11 |
# File 'lib/gattica/user.rb', line 9 def email @email end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/gattica/user.rb', line 9 def password @password end |
Instance Method Details
#to_h ⇒ Object
User gets a special to_h
because Google expects Email
and Passwd
instead of our nicer internal names
18 19 20 21 |
# File 'lib/gattica/user.rb', line 18 def to_h { :Email => @email, :Passwd => @password } end |