Class: Rafflesia::AuthUser
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::AuthUser
- Defined in:
- lib/rafflesia/auth/auth_user.rb
Constant Summary collapse
- HASH_ATTRS =
{ email: :email, email_verified: :email_verified, first_name: :first_name, id: :id, last_name: :last_name, name: :name }.freeze
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#email_verified ⇒ Object
Returns the value of attribute email_verified.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(json) ⇒ AuthUser
constructor
A new instance of AuthUser.
Constructor Details
#initialize(json) ⇒ AuthUser
Returns a new instance of AuthUser.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/auth/auth_user.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @email = hash[:email] @email_verified = hash[:email_verified] @first_name = hash[:first_name] @id = hash[:id] @last_name = hash[:last_name] @name = hash[:name] end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
17 18 19 |
# File 'lib/rafflesia/auth/auth_user.rb', line 17 def email @email end |
#email_verified ⇒ Object
Returns the value of attribute email_verified.
17 18 19 |
# File 'lib/rafflesia/auth/auth_user.rb', line 17 def email_verified @email_verified end |
#first_name ⇒ Object
Returns the value of attribute first_name.
17 18 19 |
# File 'lib/rafflesia/auth/auth_user.rb', line 17 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/rafflesia/auth/auth_user.rb', line 17 def id @id end |
#last_name ⇒ Object
Returns the value of attribute last_name.
17 18 19 |
# File 'lib/rafflesia/auth/auth_user.rb', line 17 def last_name @last_name end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/rafflesia/auth/auth_user.rb', line 17 def name @name end |