Class: CalDAV::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/CalDAV/Resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



8
9
10
# File 'lib/CalDAV/Resource.rb', line 8

def hash
  @hash
end

Instance Method Details

#calendar_dataObject

Navigation accessors. Strictly navigation, not parsing: they return the underlying iCalendar string or value.



25
26
27
# File 'lib/CalDAV/Resource.rb', line 25

def calendar_data
  property(NAMESPACE, 'calendar-data')
end

#calendar_descriptionObject



29
30
31
# File 'lib/CalDAV/Resource.rb', line 29

def calendar_description
  property(NAMESPACE, 'calendar-description')
end

#calendar_timezoneObject



37
38
39
# File 'lib/CalDAV/Resource.rb', line 37

def calendar_timezone
  property(NAMESPACE, 'calendar-timezone')
end

#hrefObject



10
11
12
# File 'lib/CalDAV/Resource.rb', line 10

def href
  hash[:href]
end

#is_calendar?Boolean

Matches a <calendar> element (under any namespace prefix) in the serialised resourcetype, rather than a bare ‘calendar’ substring: the substring also matches calendar-proxy-read/write collections, which are not calendars.

Returns:

  • (Boolean)


44
45
46
# File 'lib/CalDAV/Resource.rb', line 44

def is_calendar?
  resource_type.match?(%r{<(?:\w+:)?calendar(?:\s[^>]*)?/?>})
end

#propstatsObject



18
19
20
# File 'lib/CalDAV/Resource.rb', line 18

def propstats
  hash[:propstats]
end

#statusObject



14
15
16
# File 'lib/CalDAV/Resource.rb', line 14

def status
  hash[:status]
end

#supported_calendar_component_setObject



33
34
35
# File 'lib/CalDAV/Resource.rb', line 33

def supported_calendar_component_set
  property(NAMESPACE, 'supported-calendar-component-set')
end