Included Modules

Class Index [+]

Quicksearch

When::Coordinates::Temporal

暦座標を扱う処理をまとめたモジュール

  When::TM::Calendar と When::TM::Clock に共通する処理だが、ISO 19108 で両者の
  直接の superclass である、When::TM::ReferenceSystem は、これらの処理を持たない
  こととなっているため、When::TM::Calendar と When::TM::Clock の共通部分を
  モジュールとしてまとめた。

Attributes

epoch[R]

日時要素の境界イベント

  type : [Integer]

  Ex.[  0,  3, 25], [When::Coordinates::Pair(0,-1), 15,  0,  0]
origin_of_MSD[R]

年/日の原点(origin of most significant digit)

  type : Integer
origin_of_LSD[R]

日/秒の原点(origin of least significant digit)

  type : Integer
indices[R]

インデクスオブジェクト

  type : [When::Coordinates::Index]
index_of_MSD[R]

年/日のインデクス(index of most significant digit)

  type : Integer
unit[R]

日時要素の要素数

  type : [Integer]

  Ex. [nil, 12],       [nil, 24, 60, 60]

  初期化時に indices から自動生成する
base[R]

日時要素の下限

  type : [Integer]

  Ex. [nil, 1,  1],    [nil,  0,  0,  0]

  初期化時に indices から自動生成する
pair[R]

日時要素がPairであるべきか

  type : [Boolean]

  Ex. [false] * 3,     [false] * 4

  初期化時に indices から自動生成する
notes[R]

暦注

  type : When::CalendarTypes::CalendarNotes or [When::CalendarTypes::CalendarNotes]

Public Instance Methods

_validate(source, other=nil, &block) click to toggle source

日時要素の正規化

  source  : [Numeric (include When::Coordinates::pair)]
    正規化しようとしている日時要素の Array
  other   : [Numeric]
    日時要素ごとに加減算を行う場合、加減算量の Array を指定する
  block   : Block
    日付要素と時刻要素に関連がある場合、block を指定して、両者の
    情報をやり取りする( yield で通日を渡し、通日を返してもらう)。

    例1: 夏時間制を採用している場合、日付によって時刻の正規化の仕方が影響を受ける
    例2: 日の境界が日没の場合、当該時刻が日没の前か後かで日付が変わる

  returns : [Numeric (include When::Coordinates::pair)]
    正規化された日時要素の Array
    日時要素は、それぞれの When::TM::Calendar や When::TM::Clockの実装に応じて、
    有効な値となっている。
      # File when/coordinates.rb, line 1086
1086:     def _validate(source, other=nil, &block)
1087:       return _encode(_decode(source, other, &block))
1088:     end
method_missing(name, *args, &block) click to toggle source

その他のメソッド

  When::TM::TemporalPosition で定義されていないメソッドは
  処理を @frame (type: When::TM::Calendar or When::TM::Clock) に委譲する
      # File when/coordinates.rb, line 1061
1061:     def method_missing(name, *args, &block)
1062:       note, = @notes
1063:       note.respond_to?(name) ? note.send(name.to_sym, *(args + [self]), &block) :
1064:                                _method_missing(name, *args, &block)
1065:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.