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
76
77
78
|
# File 'lib/ask/agent/context_sources.rb', line 76
def baseline(date)
"Today's date is #{date}."
end
|
#load ⇒ Object
72
73
74
|
# File 'lib/ask/agent/context_sources.rb', line 72
def load
::Date.today.iso8601
end
|
#update(prev, curr) ⇒ Object
80
81
82
|
# File 'lib/ask/agent/context_sources.rb', line 80
def update(prev, curr)
"I previously said the date was #{prev}, but it is now #{curr}."
end
|