Class: Cardigan::Command::FilterCards

Inherits:
ListCards
  • Object
show all
Defined in:
lib/cardigan/command/filter_cards.rb

Instance Method Summary collapse

Methods inherited from ListCards

#initialize

Constructor Details

This class inherits a constructor from Cardigan::Command::ListCards

Instance Method Details

#execute(filter) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/cardigan/command/filter_cards.rb', line 4

def execute filter
  @repository.filter = filter
  begin
    super
  rescue Exception => e
    @io.say "Invalid expression:\n#{e.message}"
    @repository.filter = nil
  end
end