class Trello::List
A List
is a container which holds cards. Lists are items on a board.
@!attribute [r] id
@return [String]
@!attribute [rw] name
@return [String]
@!attribute [rw] closed
@return [Boolean]
@!attribute [r] board_id
@return [String] A 24-character hex string
@!attribute [rw] pos
@return [Object]
@!attribute [w] source_list_id
@return [String]
@!attribute [w] subscribed
@return [Boolean]
Public Class Methods
find(id, params = {})
click to toggle source
Finds a specific list, given an id.
@param [id] id the list's ID on Trello
(24-character hex string). @param [Hash] params
# File lib/trello/list.rb, line 48 def find(id, params = {}) client.find(:list, id, params) end
Public Instance Methods
archive_all_cards()
click to toggle source
Archives all the cards of the list
# File lib/trello/list.rb, line 92 def archive_all_cards client.post("/lists/#{id}/archiveAllCards") end
close()
click to toggle source
# File lib/trello/list.rb, line 58 def close self.closed = true end
close!()
click to toggle source
# File lib/trello/list.rb, line 62 def close! close save end
closed?()
click to toggle source
Check if the list is not active anymore.
# File lib/trello/list.rb, line 54 def closed? closed end
move_all_cards(other_list)
click to toggle source
# File lib/trello/list.rb, line 77 def move_all_cards(other_list) client.post("/lists/#{id}/moveAllCards", { idBoard: other_list.board_id, idList: other_list.id }) end
move_to_board(board)
click to toggle source
Move list to another board. Accepts a `Trello::Board` or an id string.
# File lib/trello/list.rb, line 85 def move_to_board(board) board = board.id unless board.is_a?(String) client.put("/lists/#{id}/idBoard", value: board) end