Class: When::Coordinates::Border
- Inherits:
-
BasicTypes::Object
- Object
- BasicTypes::Object
- When::Coordinates::Border
- Defined in:
- lib/when_exe/coordinates.rb
Overview
日時要素の境界 - Border
Direct Known Subclasses
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
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 Method Details
#_adjust_epoch(date, frame = nil) ⇒ Array<Numeric>
境界の正規化
1875 1876 1877 1878 1879 1880 1881 1882 |
# File 'lib/when_exe/coordinates.rb', line 1875 def _adjust_epoch(date, frame=nil) s_date = date.dup e_date = border([+date[0]], frame) branch = 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 |
#behavior ⇒ Numeric
境界の振舞
1848 1849 1850 |
# File 'lib/when_exe/coordinates.rb', line 1848 def behavior @border[0] end |
#border(date = [], frame = nil) ⇒ Array<Numeric>
境界の取得
1859 1860 1861 1862 1863 1864 1865 1866 |
# File 'lib/when_exe/coordinates.rb', line 1859 def border(date=[], frame=nil) last = date.length-1 return @border if last<0 b_date = date[0..last] + @border[(last+1)..-1] branch = @border[last] * 0 b_date[last] = When::Coordinates::Pair.new(date[last] * 1, branch) return b_date end |