Class: Trello::Item

Inherits:
BasicData show all
Defined in:
lib/trello/item.rb

Overview

An Item is a basic task that can be checked off and marked as completed.

Instance Attribute Summary

Attributes inherited from BasicData

#client

Instance Method Summary collapse

Methods inherited from BasicData

#==, client, create, find, #initialize, many, one, parse, parse_many, path_name, #refresh!, register_attributes, save

Constructor Details

This class inherits a constructor from Trello::BasicData

Instance Method Details

#update_fields(fields) ⇒ Object

Updates the fields of an item.

Supply a hash of string keyed data retrieved from the Trello API representing an item.



11
12
13
14
15
16
17
18
# File 'lib/trello/item.rb', line 11

def update_fields(fields)
  attributes[:id]    = fields['id']
  attributes[:name]  = fields['name']
  attributes[:type]  = fields['type']
  attributes[:state] = fields['state']
  attributes[:pos]   = fields['pos']
  self
end