Class: Rcal::Value::Period::TimeTimePeriod

Inherits:
Rcal::Value::Period show all
Defined in:
lib/rcal/value/period.rb

Constant Summary

Constant Summary

Constants inherited from Rcal::Value::Period

PERIOD

Instance Attribute Summary collapse

Attributes inherited from Rcal::Value::Period

#start

Instance Method Summary collapse

Methods inherited from Rcal::Value::Period

#to_range

Methods included from Rcal::Value

parser, parser_for

Constructor Details

#initialize(start, stop) ⇒ TimeTimePeriod

Returns a new instance of TimeTimePeriod



91
92
93
94
95
# File 'lib/rcal/value/period.rb', line 91

def initialize(start, stop)
  super(start)
  validate_date_time(stop)
  @end = stop
end

Instance Attribute Details

#endObject (readonly)

Returns the value of attribute end



89
90
91
# File 'lib/rcal/value/period.rb', line 89

def end
  @end
end

Instance Method Details

#to_icalObject



97
98
99
# File 'lib/rcal/value/period.rb', line 97

def to_ical
  start.to_ical + '/' + self.end.to_ical
end