Class: Helium::User
- Inherits:
-
Object
- Object
- Helium::User
- Defined in:
- lib/helium/user.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(client:, params:) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(client:, params:) ⇒ User
Returns a new instance of User.
5 6 7 8 9 10 11 12 |
# File 'lib/helium/user.rb', line 5 def initialize(client:, params:) @client = client @id = params["id"] @name = params["attributes"]["name"] @email = params["meta"]["email"] @created_at = params["meta"]["created"] @updated_at = params["meta"]["updated"] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/helium/user.rb', line 3 def created_at @created_at end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/helium/user.rb', line 3 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/helium/user.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/helium/user.rb', line 3 def name @name end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/helium/user.rb', line 3 def updated_at @updated_at end |