Class: CalDAV::Resource
- Inherits:
-
Object
- Object
- CalDAV::Resource
- Defined in:
- lib/CalDAV/Resource.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
-
#calendar_data ⇒ Object
Navigation accessors.
- #calendar_description ⇒ Object
- #calendar_timezone ⇒ Object
- #href ⇒ Object
-
#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.
- #max_attendees_per_instance ⇒ Object
- #max_date_time ⇒ Object
- #max_instances ⇒ Object
- #max_resource_size ⇒ Object
- #min_date_time ⇒ Object
- #propstats ⇒ Object
- #status ⇒ Object
- #supported_calendar_component_set ⇒ Object
- #supported_calendar_data ⇒ Object
Instance Attribute Details
#hash ⇒ Object (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_data ⇒ Object
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_description ⇒ Object
29 30 31 |
# File 'lib/CalDAV/Resource.rb', line 29 def calendar_description property(NAMESPACE, 'calendar-description') end |
#calendar_timezone ⇒ Object
41 42 43 |
# File 'lib/CalDAV/Resource.rb', line 41 def calendar_timezone property(NAMESPACE, 'calendar-timezone') end |
#href ⇒ Object
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.
68 69 70 |
# File 'lib/CalDAV/Resource.rb', line 68 def is_calendar? resource_type.match?(%r{<(?:\w+:)?calendar(?:\s[^>]*)?/?>}) end |
#max_attendees_per_instance ⇒ Object
61 62 63 |
# File 'lib/CalDAV/Resource.rb', line 61 def max_attendees_per_instance property(NAMESPACE, 'max-attendees-per-instance') end |
#max_date_time ⇒ Object
53 54 55 |
# File 'lib/CalDAV/Resource.rb', line 53 def max_date_time property(NAMESPACE, 'max-date-time') end |
#max_instances ⇒ Object
57 58 59 |
# File 'lib/CalDAV/Resource.rb', line 57 def max_instances property(NAMESPACE, 'max-instances') end |
#max_resource_size ⇒ Object
45 46 47 |
# File 'lib/CalDAV/Resource.rb', line 45 def max_resource_size property(NAMESPACE, 'max-resource-size') end |
#min_date_time ⇒ Object
49 50 51 |
# File 'lib/CalDAV/Resource.rb', line 49 def min_date_time property(NAMESPACE, 'min-date-time') end |
#propstats ⇒ Object
18 19 20 |
# File 'lib/CalDAV/Resource.rb', line 18 def propstats hash[:propstats] end |
#status ⇒ Object
14 15 16 |
# File 'lib/CalDAV/Resource.rb', line 14 def status hash[:status] end |
#supported_calendar_component_set ⇒ Object
33 34 35 |
# File 'lib/CalDAV/Resource.rb', line 33 def supported_calendar_component_set property(NAMESPACE, 'supported-calendar-component-set') end |
#supported_calendar_data ⇒ Object
37 38 39 |
# File 'lib/CalDAV/Resource.rb', line 37 def supported_calendar_data property(NAMESPACE, 'supported-calendar-data') end |