Class: CalDAV::Request::ReportVEVENT

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

Instance Attribute Summary collapse

Attributes inherited from Base

#xml

Instance Method Summary collapse

Constructor Details

#initialize(tstart = nil, tend = nil) ⇒ ReportVEVENT

Returns a new instance of ReportVEVENT.



37
38
39
40
41
# File 'lib/caldav/request.rb', line 37

def initialize( tstart=nil, tend=nil )
    @tstart = tstart
    @tend   = tend
    super()
end

Instance Attribute Details

#tendObject

Returns the value of attribute tend.



35
36
37
# File 'lib/caldav/request.rb', line 35

def tend
  @tend
end

#tstartObject

Returns the value of attribute tstart.



35
36
37
# File 'lib/caldav/request.rb', line 35

def tstart
  @tstart
end

Instance Method Details

#to_xmlObject



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/caldav/request.rb', line 43

def to_xml
    xml.c 'calendar-query'.intern, NAMESPACES do
        xml.d :prop do
            xml.d :getetag
            xml.c 'calendar-data'.intern
        end
        xml.c :filter do
            xml.c 'comp-filter'.intern, :name=> 'VCALENDAR' do
                xml.c 'comp-filter'.intern, :name=> 'VEVENT' do
                    xml.c 'time-range'.intern, :start=> "#{tstart}Z", :end=> "#{tend}Z"
                end
            end
        end
    end
end