Eventを定義する
BEGIN:VEVENT...END:VEVENT のブロックに対応
RRULE Property
type : Hash iCalendar の RRULE を Hash に展開したものを保持している。 RRULE は、年のサイクルや7日以外の日のサイクルおよび夏時間の切り替えを 扱えるように RFC 5545 から拡張されている。
DURATION Property
type : When::TM::Duration DTSTART Property が保持する When::TM::(Temporal)Position の分解能で識別できない 時間差はイベント継続中とみなすので、例えば分解能が DAY の場合、DURATION Porperty に When.Duration('P1D')と指定する必要はない。 DTEND Property が指定された場合、DURATION Property に変換して保持する。
When::V::Event Class のグローバルな設定を行う
default_until : When::TM::IntervalLength RRULE の条件が成立しない場合に無限ループにおちいることを避けるため 他に指定がなくとも、計算を打ち切るようにしている。その打ち切り時間 (When.now + default_until)を本メソッドで指定している。 default_until の指定がない場合、default_until は 1000年と解釈する。
# File when/icalendar.rb, line 509 509: def setup(default_until=nil) 510: @_pool = {} 511: @default_until = default_until 512: end
最後のイベント
returns : When::TM::(Temporal)Position or When::Parts::GeometricComplex 無限に続く可能性がある場合、When::TM::IndeterminateValue::Max(+Infinity)
# File when/icalendar.rb, line 578 578: def dtstop 579: return @dtstop if (@dtstop) 580: 581: @dtstop = @dtstart 582: @rdate.each do |date| 583: @dtstop = date if (date > @dtstop) 584: end 585: @rrule.each do |rrule| 586: unless (rrule['UNTIL']) 587: @dtstop = When::TM::IndeterminateValue::Max 588: break 589: end 590: @dtstop = rrule['UNTIL'] if (rrule['UNTIL'] > @dtstop) 591: end 592: return @dtstop 593: end
順次実行
引数パターン1 range : Range(サブクラスである When::Parts::GeometricComplexでもよい) 始点 - range.first 終点 - range.last count_limit : Integer 繰り返し回数(デフォルトは指定なし) 引数パターン2 first : When::TM::(Temporal)Position 始点 direction : :forward or :reverse :forward - 昇順 :reverse - 降順 count_limit : Integer 繰り返し回数(デフォルトは指定なし) block が与えられている場合、yield する。 returns : Enumerator
# File when/icalendar.rb, line 617 617: def each(*args, &block) 618: if args.length > 0 619: super 620: else 621: super(@dtstart, &block) 622: end 623: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.