module DailyReporter::Task
Constants
- TASKS_FILE
Public Class Methods
add(task)
click to toggle source
# File lib/daily_reporter/task.rb, line 16 def add(task) File.open(TASKS_FILE, 'a') do |f| f.puts task.strip end end
clear_status()
click to toggle source
# File lib/daily_reporter/task.rb, line 12 def clear_status File.open(TASKS_FILE, 'w') {} end
status()
click to toggle source
# File lib/daily_reporter/task.rb, line 5 def status content = File.open(TASKS_FILE, 'a+') do |f| f.read end content.empty? ? nil : content end