Module: Dooby
- Defined in:
- lib/dooby.rb,
lib/dooby/base.rb,
lib/dooby/list.rb,
lib/dooby/task.rb,
lib/dooby/config.rb,
lib/dooby/cli_helper.rb,
lib/dooby/exceptions.rb,
lib/dooby/dates_helper.rb,
lib/dooby/status_generator.rb
Defined Under Namespace
Modules: DatesHelper, Exceptions, StatusGenerator Classes: Base, CLIHelper, List, Task
Constant Summary collapse
- DOOBY_DIR =
'.dooby'- CURRENT_TODO_LIST_FILE =
"#{DOOBY_DIR}/list.yml"- AVAILABLE_STATUSES =
STATUSES
[:hold, :doing, :done]
- SPECIAL_CHAR_COLORS =
SPECIAL CHARS
- SPECIAL_CHARS =
SPECIAL_CHAR_COLORS.keys
- TODAY_TAG =
TAGS
'#today'- TOMORROW_TAG =
"#tomorrow"- URGENT_TAG =
'#urgent'- SPLITTABLE_TAGS =
[TODAY_TAG, URGENT_TAG]
- CURRENT_ITEM_TAG =
':doing'- DATE_FORMAT =
DATES
'%b/%d/%Y'- TASK_ROW_TEMPLATE =
TEMPLATES
lambda do |task| " (#{task.id.red}) #{task.colorize}" end
Class Method Summary collapse
Class Method Details
.cli_helper ⇒ Object
47 48 49 |
# File 'lib/dooby.rb', line 47 def self.cli_helper CLIHelper end |
.current_list ⇒ Object
38 39 40 |
# File 'lib/dooby.rb', line 38 def self.current_list @list ||= List.new CURRENT_TODO_LIST_FILE end |
.init ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/dooby.rb', line 23 def self.init unless File.exist? CURRENT_TODO_LIST_FILE FileUtils.mkdir DOOBY_DIR Base.create_file true else puts "Todo list already exists inside this directory" false end end |
.reload! ⇒ Object
42 43 44 45 |
# File 'lib/dooby.rb', line 42 def self.reload! @list = nil current_list end |
.trash! ⇒ Object
34 35 36 |
# File 'lib/dooby.rb', line 34 def self.trash! FileUtils.remove_dir(DOOBY_DIR, force = true) end |