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.
- #propstats ⇒ Object
- #status ⇒ Object
- #supported_calendar_component_set ⇒ 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
37 38 39 |
# File 'lib/CalDAV/Resource.rb', line 37 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.
44 45 46 |
# File 'lib/CalDAV/Resource.rb', line 44 def is_calendar? resource_type.match?(%r{<(?:\w+:)?calendar(?:\s[^>]*)?/?>}) 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 |