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 33 34 35 36 37 |
# File 'lib/protocol/caldav/filter/match.rb', line 23 def addressbook?(filter, card) if card if filter.prop_filters.empty? true else 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 else false end end |
.calendar?(filter, component) ⇒ Boolean
--- Calendar (RFC 4791 §9.7) ---
13 14 15 16 17 18 19 |
# File 'lib/protocol/caldav/filter/match.rb', line 13 def calendar?(filter, component) if component comp_filter_matches?(filter, component) else false end end |