Method: Viddler::User#initialize
- Defined in:
- lib/viddler/user.rb
#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 |