lib/ri_cal/properties/event.rb in rubyredrick-ri_cal-0.0.11 vs lib/ri_cal/properties/event.rb in rubyredrick-ri_cal-0.5.0
- old
+ new
@@ -52,11 +52,11 @@
end
# set the CREATED property
# property value should be an instance of RiCal::PropertyValueDateTime
def created_property=(property_value)
- @created_property = property_value.for_parent(self)
+ @created_property = property_value ? property_value.for_parent(self) : nil
end
# set the value of the CREATED property
def created=(ruby_value)
self.created_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
@@ -118,11 +118,11 @@
end
# set the DTSTART property
# property value should be an instance of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
def dtstart_property=(property_value)
- @dtstart_property = property_value.for_parent(self)
+ @dtstart_property = property_value ? property_value.for_parent(self) : nil
end
# set the value of the DTSTART property
def dtstart=(ruby_value)
self.dtstart_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
@@ -184,11 +184,11 @@
end
# set the LAST-MODIFIED property
# property value should be an instance of RiCal::PropertyValueDateTime
def last_modified_property=(property_value)
- @last_modified_property = property_value.for_parent(self)
+ @last_modified_property = property_value ? property_value.for_parent(self) : nil
end
# set the value of the LAST-MODIFIED property
def last_modified=(ruby_value)
self.last_modified_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
@@ -316,11 +316,11 @@
end
# set the DTSTAMP property
# property value should be an instance of RiCal::PropertyValueDateTime
def dtstamp_property=(property_value)
- @dtstamp_property = property_value.for_parent(self)
+ @dtstamp_property = property_value ? property_value.for_parent(self) : nil
end
# set the value of the DTSTAMP property
def dtstamp=(ruby_value)
self.dtstamp_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
@@ -547,11 +547,11 @@
end
# set the RECURRENCE-ID property
# property value should be an instance of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
def recurrence_id_property=(property_value)
- @recurrence_id_property = property_value.for_parent(self)
+ @recurrence_id_property = property_value ? property_value.for_parent(self) : nil
end
# set the value of the RECURRENCE-ID property
def recurrence_id=(ruby_value)
self.recurrence_id_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
@@ -580,11 +580,11 @@
end
# set the DTEND property
# property value should be an instance of either RiCal::PropertyValue::DateTime or RiCal::PropertyValue::Date
def dtend_property=(property_value)
- @dtend_property = property_value.for_parent(self)
+ @dtend_property = property_value ? property_value.for_parent(self) : nil
@duration_property = nil
end
# set the value of the DTEND property
def dtend=(ruby_value)
@@ -1037,11 +1037,11 @@
@rdate_property = ruby_values.map {|val| RiCal::PropertyValue::OccurrenceList.convert(self, *val)}
end
# set the value of the RDATE property to a single value
# one instance of OccurrenceList may be passed to this method
- def rdate=(ruby_value)
- @rdate_property = [RiCal::PropertyValue::OccurrenceList.convert(self, ruby_value)]
+ def rdate=(*ruby_value)
+ @rdate_property = [RiCal::PropertyValue::OccurrenceList.convert(self, *ruby_value)]
end
# add one or more values to the RDATE property
# one or more instances of OccurrenceList may be passed to this method
def add_rdates(*ruby_values)