module Todo
Constants
- VERSION
Public Class Methods
edit()
click to toggle source
# File lib/tasky.rb, line 60 def edit exec("#{editor} #{Todo::Task.file}") end
editor()
click to toggle source
# File lib/tasky.rb, line 64 def editor ENV['VISUAL'] || ENV['EDITOR'] || 'vim' end
help()
click to toggle source
# File lib/tasky.rb, line 68 def help puts 'Usage: todo [options] <args>' exit end
print_tasks(status = :todo)
click to toggle source
# File lib/tasky.rb, line 52 def print_tasks(status = :todo) pattern = status == :todo ? /^\[x/ : /^\[ / File.open(Task.file).each_line do |l| puts(l) unless l[pattern] end exit end
start(args)
click to toggle source
# File lib/tasky.rb, line 44 def start(args) options = Options.parse args @task = Task.new args @task.save end
version()
click to toggle source
# File lib/tasky.rb, line 73 def version VERSION end