Method: Twterm::Tab::UserListManagement#initialize
- Defined in:
- lib/twterm/tab/user_list_management.rb
#initialize(app, client, user_id) ⇒ UserListManagement
Returns a new instance of UserListManagement.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/twterm/tab/user_list_management.rb', line 20 def initialize(app, client, user_id) super(app, client) @user_id = user_id @list_ids = Concurrent::Array.new client.owned_lists.then do |lists| @@lists = lists.sort_by(&:full_name) render end client.memberships(user_id, filter_to_owned_lists: true, count: 1000).then do |lists| @list_ids = lists.map(&:id) initially_loaded! end end |