Class: When::V::Calendar
- Inherits:
-
Root
- Object
- BasicTypes::Object
- Root
- When::V::Calendar
- Defined in:
- lib/when_exe/icalendar.rb
Overview
ひとつの ics 形式ファイルをまとめて保持する
BEGIN:VCALENADR...END:VCALENDAR のブロックに対応
Constant Summary collapse
- Properties =
[['prodid', 'version'], [], ['method'], [], []]
- Classes =
nil
Constants inherited from Root
Root::AwareProperties, Root::DefaultOptional, Root::DefaultUnique
Constants included from Parts::Resource
Parts::Resource::LabelProperty, Parts::Resource::Prefix, Parts::Resource::PrefixIndex, Parts::Resource::PrefixKeys, Parts::Resource::PrefixValues
Instance Attribute Summary collapse
-
#child ⇒ Object
readonly
Returns the value of attribute child.
Attributes inherited from Root
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #keys, #locale, #namespace
Instance Method Summary collapse
- #_enumerator_list(args) ⇒ Object
-
#intersection(keys = {}) ⇒ When::V::Calendar
When::V::Event の検索.
Methods inherited from Root
Methods inherited from BasicTypes::Object
Methods included from Parts::Resource
#[], #^, _extract_prefix, _instance, _parse, _path_with_prefix, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?
Methods included from Parts::Resource::Pool
#[], #[]=, #_pool, #_setup_, #pool_keys
Methods included from Parts::Resource::Synchronize
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Instance Attribute Details
#child ⇒ Object
Returns the value of attribute child.
442 443 444 |
# File 'lib/when_exe/icalendar.rb', line 442 def child @child end |
Instance Method Details
#_enumerator_list(args) ⇒ Object
468 469 470 471 472 |
# File 'lib/when_exe/icalendar.rb', line 468 def _enumerator_list(args) (@child.reject {|el| !el.kind_of?(Event)}).inject([]) { |sum, ev| sum += ev._enumerator_list(args) } end |
#intersection(keys = {}) ⇒ When::V::Calendar
When::V::Event の検索
452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/when_exe/icalendar.rb', line 452 def intersection(keys={}) copy = self.dup copy.child = @child.select {|ev| if ev.kind_of?(Event) keys.each_pair do |key, value| value = /#{value}/ if value.kind_of?(String) break unless (value === ev.property[key].object) end else true end } return copy end |