Class: Todos::Commands::GeneralCommands::ListContexts
- Inherits:
-
Object
- Object
- Todos::Commands::GeneralCommands::ListContexts
- Extended by:
- BasicList
- Defined in:
- lib/todos_cli.rb
Constant Summary collapse
- KEY =
'c'
- DESCRIPTION =
'List contexts'
Class Method Summary collapse
Methods included from BasicList
Class Method Details
.execute ⇒ Object
128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/todos_cli.rb', line 128 def self.execute puts 'List of contests' contexts = Context.active unless contexts.empty? print_list(contexts) conditions = { :done => false }.merge(Asker.single(:context_id)) BasicTaskList.execute(conditions) else puts 'There are no contexts' end end |