Class: CalDAV::Filter::TimeRange

Inherits:
Base
  • Object
show all
Defined in:
lib/caldav/filter.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#child, #parent

Instance Method Summary collapse

Methods inherited from Base

#to_xml

Constructor Details

#initialize(range, parent = nil) ⇒ TimeRange

Returns a new instance of TimeRange.



50
51
52
53
# File 'lib/caldav/filter.rb', line 50

def initialize(range, parent = nil)
  self.range = range
  self.parent = parent
end

Instance Attribute Details

#rangeObject

Returns the value of attribute range.



48
49
50
# File 'lib/caldav/filter.rb', line 48

def range
  @range
end

Instance Method Details

#build_xml(xml) ⇒ Object



55
56
57
58
59
# File 'lib/caldav/filter.rb', line 55

def build_xml(xml)
  xml.tag! "cal:time-range",
    :start => range.begin.to_ical,
    :end   => range.end.to_ical
end