Parent

Namespace

Included Modules

Class Index [+]

Quicksearch

When::V::Event

Eventを定義する

  BEGIN:VEVENT...END:VEVENT のブロックに対応

Attributes

default_until[R]
rrule[R]

RRULE Property

  type : Hash

    iCalendar の RRULE を Hash に展開したものを保持している。
    RRULE は、年のサイクルや7日以外の日のサイクルおよび夏時間の切り替えを
    扱えるように RFC 5545 から拡張されている。
dtstart[R]

DTSTART Property

  type : When::TM::(Temporal)Position or When::Parts::GeometricComplex
duration[R]

DURATION Property

  type : When::TM::Duration

  DTSTART Property が保持する When::TM::(Temporal)Position の分解能で識別できない
  時間差はイベント継続中とみなすので、例えば分解能が DAY の場合、DURATION Porperty
  に When.Duration('P1D')と指定する必要はない。

  DTEND Property が指定された場合、DURATION Property に変換して保持する。
exdate[R]

EXDATE Property

  type : When::Parts::GeometricComplex
rdate[R]

RDATE Property

  type : [When::TM::(Temporal)Position or When::Parts::GeometricComplex]

  RRULE の COUNT が指定されている場合、後で途中の系列を抜き出すような指定をされても
  よいように、Enumerator 生成時にCOUNT分の計算をして RDATE Property に登録する。
  このため、COUNTに大きな値を指定すると、Enumerator 生成に予想外の時間がかかることが
  ある。
first_occurrence[R]

DTSTART Property を first occurrence とするか

  type : String
    'Include' - first occurrence とする
    'Exclude' - first occurrence しない
    それ以外  - RRULE により該当する場合に first occurrence とする

  RFC 5545 では 'Include' となっているが、それ以外の振る舞いが可能なように拡張。

Public Class Methods

setup(default_until=nil) click to toggle source

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

Public Instance Methods

dtstop() click to toggle source

最後のイベント

  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
each(*args, &block) click to toggle source

順次実行

  引数パターン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
label() click to toggle source

ユニーク識別名

  returns : String

  UID Property をユニーク識別名とする。
     # File when/icalendar.rb, line 569
569:     def label
570:       @property['uid'].object
571:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.