Class: Ask::Agent::ContextSources::Date
Overview
Today's date in ISO 8601 format.
Instance Method Summary
collapse
inherited, key, #key, registered_sources
Instance Method Details
#baseline(date) ⇒ Object
75
76
77
|
# File 'lib/ask/agent/context_sources.rb', line 75
def baseline(date)
"Today's date is #{date}."
end
|
#load ⇒ Object
71
72
73
|
# File 'lib/ask/agent/context_sources.rb', line 71
def load
::Date.today.iso8601
end
|
#update(prev, curr) ⇒ Object
79
80
81
|
# File 'lib/ask/agent/context_sources.rb', line 79
def update(prev, curr)
"I previously said the date was #{prev}, but it is now #{curr}."
end
|