Class: Icalendar2::DateTimeValue

Inherits:
Value
  • Object
show all
Defined in:
lib/icalendar2/value/date_time_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) ⇒ DateTimeValue

Returns a new instance of DateTimeValue.



6
7
8
9
10
11
12
# File 'lib/icalendar2/value/date_time_value.rb', line 6

def initialize(value)
  if value.is_a?(DateTime)
    super(value.strftime('%Y%m%dT%H%M%S'))
  else
    super(value)
  end
end