class Trello::CheckItemState
Represents the state of an item.
@!attribute [r] id
@return [String]
@!attribute [r] state
@return [Object]
@!attribute [r] item_id
@return [String]
Public Instance Methods
item()
click to toggle source
Return the item this state belongs to.
# File lib/trello/item_state.rb, line 26 def item Item.find(item_id) end
update_fields(fields)
click to toggle source
Update the fields of an item state.
Supply a hash of string keyed data retrieved from the Trello
API representing an item state.
# File lib/trello/item_state.rb, line 18 def update_fields(fields) attributes[:id] = fields['id'] || attributes[:id] attributes[:state] = fields['state'] || attributes[:state] attributes[:item_id] = fields['idCheckItem'] || attributes[:item_id] self end