Method: Twterm::User#update!

Defined in:
lib/twterm/user.rb

#update!(user) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/twterm/user.rb', line 15

def update!(user)
  @name = user.name
  @screen_name = user.screen_name
  @description = user.description.is_a?(Twitter::NullObject) ? '' : user.description
  @location = user.location.is_a?(Twitter::NullObject) ? '' : user.location
  @website = user.website
  @protected = user.protected?
  @statuses_count = user.statuses_count
  @favorites_count = user.favorites_count
  @friends_count = user.friends_count
  @followers_count = user.followers_count
  @url = user.url
  @verified = user.verified?
  @profile_image = user.profile_image_uri_https
  @profile_background_image = user.profile_banner_uri_https

  self
end