Class: Icalendar2::DateValue

Inherits:
Value
  • Object
show all
Defined in:
lib/icalendar2/value/date_value.rb

Overview

Instance Attribute Summary

Attributes inherited from Value

#value

Instance Method Summary collapse

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