Method: Facebooker::User#cast_to_friend_list_id

Defined in:
lib/facebooker/models/user.rb

#cast_to_friend_list_id(flid) ⇒ Object



93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/facebooker/models/user.rb', line 93

def cast_to_friend_list_id(flid)
 case flid
  when String
    list=friend_lists.detect {|f| f.name==flid}
    raise Facebooker::Session::InvalidFriendList unless list
    list.flid
  when FriendList
    flid.flid
  else
    flid
  end
end