Class: Smartdown::Model::Answer::Date
- Inherits:
-
Base
- Object
- Base
- Smartdown::Model::Answer::Date
show all
- Defined in:
- lib/smartdown/model/answer/date.rb
Instance Attribute Summary
Attributes inherited from Base
#error, #question, #value
Instance Method Summary
collapse
Methods inherited from Base
#*, #+, #-, #/, #<=>, #initialize, #invalid?, #valid?
Instance Method Details
#humanize ⇒ Object
15
16
17
|
# File 'lib/smartdown/model/answer/date.rb', line 15
def humanize
value.strftime("%-d %B %Y")
end
|
#to_s ⇒ Object
11
12
13
|
# File 'lib/smartdown/model/answer/date.rb', line 11
def to_s
value.strftime("%Y-%-m-%-d")
end
|
#value_type ⇒ Object
7
8
9
|
# File 'lib/smartdown/model/answer/date.rb', line 7
def value_type
::Date
end
|