Class: Afterburn::Board

Inherits:
TrelloObjectWrapper show all
Defined in:
lib/afterburn/board.rb

Instance Attribute Summary

Attributes inherited from TrelloObjectWrapper

#id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TrelloObjectWrapper

#fetch, fetch, find, inherited, #initialize, initialize_from_trello_object, #load, #redis_key, #trello_object, #trello_object=, wrap, wrapper_class, wrapper_name, #wrapper_name

Methods included from Helpers

#constantize, #redis, #titleize

Constructor Details

This class inherits a constructor from Afterburn::TrelloObjectWrapper

Class Method Details

.fetch_by_member(member_name) ⇒ Object



5
6
7
# File 'lib/afterburn/board.rb', line 5

def self.fetch_by_member(member_name)
  Trello::Member.find(member_name).boards.map { |trello_board| initialize_from_trello_object(trello_board) }
end

Instance Method Details

#listsObject



9
10
11
# File 'lib/afterburn/board.rb', line 9

def lists
  @lists ||= trello_lists.map { |trello_list| List.factory(trello_list) }
end

#nameObject



17
18
19
# File 'lib/afterburn/board.rb', line 17

def name
  trello_board.name
end

#trello_listsObject



13
14
15
# File 'lib/afterburn/board.rb', line 13

def trello_lists
  trello_board.lists
end