Class: Iremix::User
- Inherits:
-
Object
- Object
- Iremix::User
- Defined in:
- lib/iremix/user.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#email ⇒ Object
Returns the value of attribute email.
-
#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.
-
#profile_photo ⇒ Object
Returns the value of attribute profile_photo.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(attrs = {}) ⇒ User
Returns a new instance of User.
6 7 8 |
# File 'lib/iremix/user.rb', line 6 def initialize(attrs = {}) attrs.each do |k, v| send("#{k}=", v) end end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def created_at @created_at end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def id @id end |
#last_name ⇒ Object
Returns the value of attribute last_name.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def last_name @last_name end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def name @name end |
#profile_photo ⇒ Object
Returns the value of attribute profile_photo.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def profile_photo @profile_photo end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/iremix/user.rb', line 3 def updated_at @updated_at end |
Class Method Details
.current(token) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/iremix/user.rb', line 11 def current(token) response = token.get('/api/v1/people/current.json', :params => { :access_token => token.token }) new(response.parsed) end |