lib/slow_actions.rb in ngauthier-slow-actions-0.3.1 vs lib/slow_actions.rb in ngauthier-slow-actions-0.3.2

- old
+ new

@@ -9,17 +9,17 @@ class SlowActions # Takes an options hash where you can specify :start_date and :end_date as "YYYY-MM-DD" strings def initialize(opts = {}) @log_entries = [] if opts[:start_date] - @start_date = Date.strptime(opts[:start_date]) + @start_date = opts[:start_date] else - @start_date = Date.strptime + @start_date = '0000-00-00' end if opts[:end_date] - @end_date = Date.strptime(opts[:end_date]) + @end_date = opts[:end_date] else - @end_date = Date.today + @end_date = "#{Date.today.year}-#{Date.today.month}-#{Date.today.day}" end end # Parse the file found at "file_path" and add the log entries to its collection of entries. def parse_file(file_path)