Class: When::Coordinates::MultiBorder
- Inherits:
-
Border
- Object
- BasicTypes::Object
- Border
- When::Coordinates::MultiBorder
- Defined in:
- lib/when_exe/coordinates.rb
Overview
日時要素の境界 - 年/日によって、異なる境界を使用する場合
Constant Summary
Constants included from Namespace
Namespace::DC, Namespace::DCQ, Namespace::DCT, Namespace::FOAF, Namespace::OWL, Namespace::RDF, Namespace::RDFC, Namespace::RDFS, Namespace::RSS, Namespace::XSD
Instance Attribute Summary collapse
-
#borders ⇒ Array<When::Coordinates::Border>
readonly
境界の配列.
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#_adjust_epoch(date, frame = nil) ⇒ Array<Numeric>
境界の正規化.
-
#behavior ⇒ Numeric
境界の振舞.
-
#border(date = [], frame = nil) ⇒ Array<Numeric>
境界の取得.
Methods included from Parts::Resource
#[], #^, _instance, _setup_, _setup_info, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #parent, #registered?, root_dir
Methods included from Parts::Resource::Pool
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Instance Attribute Details
#borders ⇒ Array<When::Coordinates::Border> (readonly)
境界の配列
1906 1907 1908 |
# File 'lib/when_exe/coordinates.rb', line 1906 def borders @borders end |
Instance Method Details
#_adjust_epoch(date, frame = nil) ⇒ Array<Numeric>
境界の正規化
1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 |
# File 'lib/when_exe/coordinates.rb', line 1944 def _adjust_epoch(date, frame=nil) @borders.each do |border| next unless date[0] >= border[:key] s_date = date.dup e_date = border[:border].border(date[0..0], frame) branch = border[:border].behavior * 0 branch += 1 if ((s_date[1..-1] <=> e_date[1..-1]) < 0) s_date[0] = When::Coordinates::Pair.new(+s_date[0]-branch, branch) return s_date end date end |
#behavior ⇒ Numeric
境界の振舞
1917 1918 1919 |
# File 'lib/when_exe/coordinates.rb', line 1917 def behavior @borders[0][:border].behavior end |
#border(date = [], frame = nil) ⇒ Array<Numeric>
境界の取得
1928 1929 1930 1931 1932 1933 1934 1935 |
# File 'lib/when_exe/coordinates.rb', line 1928 def border(date=[], frame=nil) last = date.length-1 return @borders[0][:boder] if (last<0) @borders.each do |border| return border[:border].border(date, frame) if date[0] >= border[:key] end date[0..last] end |