Class: AgileTrello::FilteredCardRepostitory
- Inherits:
-
Object
- Object
- AgileTrello::FilteredCardRepostitory
- Defined in:
- lib/FilteredCardRepository.rb
Instance Method Summary collapse
- #find(parameters) ⇒ Object
-
#initialize(trello_boards) ⇒ FilteredCardRepostitory
constructor
A new instance of FilteredCardRepostitory.
Constructor Details
#initialize(trello_boards) ⇒ FilteredCardRepostitory
Returns a new instance of FilteredCardRepostitory.
3 4 5 |
# File 'lib/FilteredCardRepository.rb', line 3 def initialize(trello_boards) @trello_boards = trello_boards end |
Instance Method Details
#find(parameters) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/FilteredCardRepository.rb', line 7 def find(parameters) filter = parameters[:filter] @trello_boards .get(parameters[:board_id]) .get_cards_after_list(parameters[:end_list]) .find_all {|card| filter.match(card)} end |