From 7c41c32dfdd66bde29ba811aafc4ec755dc7df17 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 6 Mar 2016 12:17:46 +0100 Subject: [PATCH] Add documentation for the #date_time_new_entry helper method --- stoptime.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stoptime.rb b/stoptime.rb index 7791ecf..5331ffa 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -892,6 +892,14 @@ end # StopTime::Models # = The Stop… Camping Time! helpers module StopTime::Helpers + # Returns the date/time to use for new time entry defaults, or +nil+ if + # none is to be used. This method can use the last time entry (if any + # and if so configured). The result is based on the +date_new_entry+ + # configuration option. + # + # @param last_entry [DateTime] the last time entry to use if configured + # for "previous" + # @return [DateTime, nil] the date/time to be used for new entry defaults def date_time_new_entry(last_entry = nil) case @config["date_new_entry"] when "previous"