Class: Icalendar2::DateValue
- Defined in:
- lib/icalendar2/value/date_value.rb
Overview
Instance Attribute Summary
Attributes inherited from Value
Instance Method Summary collapse
-
#initialize(value) ⇒ DateValue
constructor
A new instance of DateValue.
Methods inherited from Value
get_factory, matches, #to_s, #valid?
Constructor Details
#initialize(value) ⇒ DateValue
Returns a new instance of DateValue.
6 7 8 9 10 11 12 |
# File 'lib/icalendar2/value/date_value.rb', line 6 def initialize(value) if value.is_a?(Date) super(value.strftime('%Y%m%d')) else super(value) end end |