Class: Trello::Label

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

Overview

A colored Label attached to a card

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

Update the fields of a label.

Supply a hash of stringkeyed data retrieved from the Trello API representing a label.



11
12
13
14
15
# File 'lib/trello/label.rb', line 11

def update_fields(fields)
  attributes[:name]  = fields['name']
  attributes[:color] = fields['color']
  self
end