Class: Todos::Commands::GeneralCommands::ListProjects
- Inherits:
-
Object
- Object
- Todos::Commands::GeneralCommands::ListProjects
- Extended by:
- BasicList
- Defined in:
- lib/todos_cli.rb
Constant Summary collapse
- KEY =
'p'
- DESCRIPTION =
'List projects'
Class Method Summary collapse
Methods included from BasicList
Class Method Details
.execute ⇒ Object
145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/todos_cli.rb', line 145 def self.execute puts 'List of projects' projects = Project.active unless projects.empty? print_list(projects) conditions = { :done => false }.merge(Asker.single(:project_id)) BasicTaskList.execute(conditions) else puts 'There are no projects' end end |