Class: Viddler::User
- Inherits:
-
Object
- Object
- Viddler::User
- Defined in:
- lib/viddler/user.rb
Overview
This class wraps Viddler’s user’s information.
Instance Attribute Summary collapse
-
#about_me ⇒ Object
Returns the value of attribute about_me.
-
#age ⇒ Object
Returns the value of attribute age.
-
#avatar ⇒ Object
Returns the value of attribute avatar.
-
#city ⇒ Object
Returns the value of attribute city.
-
#company ⇒ Object
Returns the value of attribute company.
-
#favourite_video_count ⇒ Object
Returns the value of attribute favourite_video_count.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#friend_count ⇒ Object
Returns the value of attribute friend_count.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#homepage ⇒ Object
Returns the value of attribute homepage.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#username ⇒ Object
Returns the value of attribute username.
-
#video_upload_count ⇒ Object
Returns the value of attribute video_upload_count.
-
#video_watch_count ⇒ Object
Returns the value of attribute video_watch_count.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ User
constructor
:nodoc:.
Constructor Details
#initialize(attributes = {}) ⇒ User
:nodoc:
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/viddler/user.rb', line 20 def initialize(attributes={}) #:nodoc: a = attributes @username = a['username'] @first_name = a['first_name'] @last_name = a['last_name'] @about_me = a['about_me'] @avatar = a['avatar'] @age = a['age'].to_i @homepage = a['homepage'] @gender = a['gender'] @company = a['company'] @city = a['city'] @video_upload_count = a['video_upload_count'].to_i @video_watch_count = a['video_watch_count'].to_i @friend_count = a['friend_count'].to_i @favourite_video_count = a['favourite_video_count'].to_i end |
Instance Attribute Details
#about_me ⇒ Object
Returns the value of attribute about_me.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def about_me @about_me end |
#age ⇒ Object
Returns the value of attribute age.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def age @age end |
#avatar ⇒ Object
Returns the value of attribute avatar.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def avatar @avatar end |
#city ⇒ Object
Returns the value of attribute city.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def city @city end |
#company ⇒ Object
Returns the value of attribute company.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def company @company end |
#favourite_video_count ⇒ Object
Returns the value of attribute favourite_video_count.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def favourite_video_count @favourite_video_count end |
#first_name ⇒ Object
Returns the value of attribute first_name.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def first_name @first_name end |
#friend_count ⇒ Object
Returns the value of attribute friend_count.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def friend_count @friend_count end |
#gender ⇒ Object
Returns the value of attribute gender.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def gender @gender end |
#homepage ⇒ Object
Returns the value of attribute homepage.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def homepage @homepage end |
#last_name ⇒ Object
Returns the value of attribute last_name.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def last_name @last_name end |
#username ⇒ Object
Returns the value of attribute username.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def username @username end |
#video_upload_count ⇒ Object
Returns the value of attribute video_upload_count.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def video_upload_count @video_upload_count end |
#video_watch_count ⇒ Object
Returns the value of attribute video_watch_count.
5 6 7 |
# File 'lib/viddler/user.rb', line 5 def video_watch_count @video_watch_count end |