Module: Kernel
- Defined in:
- lib/tasklist.rb
Instance Method Summary collapse
Instance Method Details
#during(period, &block) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/tasklist.rb', line 22 def during(period, &block) block.call puts period puts '-' * 80 TaskList.output end |
#on(date, &block) ⇒ Object
29 30 31 32 |
# File 'lib/tasklist.rb', line 29 def on(date, &block) TaskList.date = Date.parse(date) block.call end |
#task(*args) ⇒ Object
34 35 36 37 38 |
# File 'lib/tasklist.rb', line 34 def task(*args) task = Task.new(TaskList.date, args[0], args[1], args[2], args[3..-1] || []) TaskList.groups[TaskList.date] ||= [] TaskList.groups[TaskList.date] << task end |