class Trello::Client::List
Trello::Client::List
object
Public Class Methods
new(list) { |self| ... }
click to toggle source
Initialize Trello::Client::List
Params:
list
-
Hash'ified JSON list or JSON string
# File lib/trello-client/list.rb, line 19 def initialize(list) @list = list.kind_of?(Hash) ? list : MultiJson.decode(list) yield self if block_given? self end
Public Instance Methods
[](key)
click to toggle source
Get Trello::Client::List
property
# File lib/trello-client/list.rb, line 28 def[](key) @list[key] end
cards()
click to toggle source
Get Array
of Trello::Client::Card
objects
# File lib/trello-client/list.rb, line 35 def cards unless @lists @cards = ( @list['cards'] || [] ).collect { |c| Trello::Client::Card.new(c) } end @cards end
to_s()
click to toggle source
String representation.
# File lib/trello-client/list.rb, line 45 def to_s @list.to_s end