Class: Trello::Attachment

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

Overview

A file or url that is linked to a Trello card

Instance Method Summary collapse

Methods inherited from BasicData

#==, find, #initialize, many, one, #refresh!, register_attributes

Constructor Details

This class inherits a constructor from Trello::BasicData

Instance Method Details

#update_fields(fields) ⇒ Object

Update the fields of an attachment.

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



9
10
11
12
13
# File 'lib/trello/attachment.rb', line 9

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