Module: Protocol::Caldav::Filter::Match
- Defined in:
- lib/protocol/caldav/filter/match.rb
Class Method Summary collapse
-
.addressbook?(filter, card) ⇒ Boolean
— Addressbook (RFC 6352 §10.5) —.
-
.calendar?(filter, component) ⇒ Boolean
— Calendar (RFC 4791 §9.7) —.
Class Method Details
.addressbook?(filter, card) ⇒ Boolean
— Addressbook (RFC 6352 §10.5) —
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/protocol/caldav/filter/match.rb', line 23 def addressbook?(filter, card) return false unless card return true if filter.prop_filters.empty? if filter.test == 'allof' filter.prop_filters.all? { |pf| card_prop_filter_matches?(pf, card) } else filter.prop_filters.any? { |pf| card_prop_filter_matches?(pf, card) } end end |
.calendar?(filter, component) ⇒ Boolean
— Calendar (RFC 4791 §9.7) —
16 17 18 19 |
# File 'lib/protocol/caldav/filter/match.rb', line 16 def calendar?(filter, component) return false unless component comp_filter_matches?(filter, component) end |