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



41
42
43
# File 'lib/CalDAV/Resource.rb', line 41

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)


68
69
70
# File 'lib/CalDAV/Resource.rb', line 68

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

#max_attendees_per_instanceObject



61
62
63
# File 'lib/CalDAV/Resource.rb', line 61

def max_attendees_per_instance
  property(NAMESPACE, 'max-attendees-per-instance')
end

#max_date_timeObject



53
54
55
# File 'lib/CalDAV/Resource.rb', line 53

def max_date_time
  property(NAMESPACE, 'max-date-time')
end

#max_instancesObject



57
58
59
# File 'lib/CalDAV/Resource.rb', line 57

def max_instances
  property(NAMESPACE, 'max-instances')
end

#max_resource_sizeObject



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

def max_resource_size
  property(NAMESPACE, 'max-resource-size')
end

#min_date_timeObject



49
50
51
# File 'lib/CalDAV/Resource.rb', line 49

def min_date_time
  property(NAMESPACE, 'min-date-time')
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

#supported_calendar_dataObject



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

def supported_calendar_data
  property(NAMESPACE, 'supported-calendar-data')
end