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 Parts::Resource
Parts::Resource::ConstList, Parts::Resource::ConstTypes, Parts::Resource::IRIDecode, Parts::Resource::IRIDecodeTable, Parts::Resource::IRIEncode, Parts::Resource::IRIEncodeTable, Parts::Resource::IRIHeader, Parts::Resource::LabelProperty
Instance Attribute Summary
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#_adjust_epoch(date, frame = nil) ⇒ Array<Numeric>
境界の正規化.
-
#_date_adjust(source) ⇒ Object
日付の補正.
-
#behavior ⇒ Numeric
境界の振舞.
-
#border(date = [], frame = nil) ⇒ Array<Numeric>
境界の取得.
Methods included from Parts::Resource
#[], #^, _abbreviation_to_iri, _decode, _encode, _extract_prefix, _instance, _instantiate, _parse, _path_with_prefix, _replace_tags, _setup_, _setup_info, _simplify_path, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?, root_dir
Methods included from Parts::Resource::Pool
#[], #[]=, #_pool, #_setup_, #pool_keys
Methods included from Parts::Resource::Synchronize
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>
境界の正規化
2224 2225 2226 2227 2228 2229 2230 2231 |
# File 'lib/when_exe/coordinates.rb', line 2224 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 |
#_date_adjust(source) ⇒ Object
日付の補正
2235 2236 2237 |
# File 'lib/when_exe/coordinates.rb', line 2235 def _date_adjust(source) source end |
#behavior ⇒ Numeric
境界の振舞
2197 2198 2199 |
# File 'lib/when_exe/coordinates.rb', line 2197 def behavior @border[0] end |
#border(date = [], frame = nil) ⇒ Array<Numeric>
境界の取得
2208 2209 2210 2211 2212 2213 2214 2215 |
# File 'lib/when_exe/coordinates.rb', line 2208 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 |