Class: TaskMapper::Provider::Trello::Project
- Inherits:
-
Base::Project
- Object
- Base::Project
- TaskMapper::Provider::Trello::Project
- Defined in:
- lib/provider/project.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*object) ⇒ Project
constructor
A new instance of Project.
Constructor Details
#initialize(*object) ⇒ Project
Returns a new instance of Project.
4 5 6 7 8 9 |
# File 'lib/provider/project.rb', line 4 def initialize(*object) if object.first object = object.first super object end end |
Class Method Details
.find_all ⇒ Object
16 17 18 19 |
# File 'lib/provider/project.rb', line 16 def find_all boards = TaskMapper::Provider::Trello.api.boards boards.map { |board| self.new board.attributes } end |
.find_by_attributes(attributes = {}) ⇒ Object
12 13 14 |
# File 'lib/provider/project.rb', line 12 def find_by_attributes(attributes = {}) search_by_attribute(self.find_all, attributes) end |
.find_by_id(id) ⇒ Object
21 22 23 24 |
# File 'lib/provider/project.rb', line 21 def find_by_id(id) board = TaskMapper::Provider::Trello.api.boards.find { |f| f.id == id} self.new board.attributes end |