Class: Intent::Commands::Projects
- Defined in:
- lib/intent/commands/projects.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#generate_id, #initialize, #print_help
Constructor Details
This class inherits a constructor from Intent::Commands::Base
Instance Method Details
#run(args, output) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/intent/commands/projects.rb', line 6 def run(args, output) if args.empty? print_help(output) else case args.first.to_sym when :help print_help(output) when :list documents.projects.all.each do |task| output.puts task.highlight_as_project end when :add add_project(args, output) end end end |