Class: TwitterFriends

Inherits:
Object
  • Object
show all
Defined in:
lib/twitter_friends.rb

Constant Summary collapse

DEBUG =
false

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(screen_name) ⇒ TwitterFriends

Returns a new instance of TwitterFriends.



13
14
15
# File 'lib/twitter_friends.rb', line 13

def initialize(screen_name)
  @screen_name = screen_name
end

Instance Attribute Details

#screen_nameObject (readonly)

Returns the value of attribute screen_name.



9
10
11
# File 'lib/twitter_friends.rb', line 9

def screen_name
  @screen_name
end

Instance Method Details

#friendsObject



17
18
19
20
21
# File 'lib/twitter_friends.rb', line 17

def friends
  @friends ||= fetch_friends
rescue OpenURI::HTTPError => err
  nil
end