Class: When::Coordinates::Stem
- Inherits:
-
Residue
- Object
- BasicTypes::Object
- Residue
- When::Coordinates::Stem
- Defined in:
- lib/when_exe/region/residue.rb,
lib/when_exe/region/japanese/residues.rb
Overview
十干
Constant Summary collapse
- Rules =
{ '歳徳' => %w(東宮甲 西宮庚 南宮丙 北宮壬 南宮丙 東宮甲 西宮庚 南宮丙 北宮壬 南宮丙), '金神' => %w(午未申酉 辰巳 子丑寅卯午未 寅卯戌亥 子丑申酉) }
Constants inherited from Residue
Residue::HashProperty, Residue::LabelProperty
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 Residue
#carry, #divisor, #remainder, #units
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#_day_notes(notes = {}, dates = nil, conditions = {}) ⇒ Object
日の十干で決まる暦注.
-
#_month_notes(notes = {}, dates = nil, conditions = {}) ⇒ Object
月の十干で決まる暦注(ダミー).
-
#_year_notes(notes = {}, dates = nil, conditions = {}) ⇒ Object
年の十干で決まる暦注.
Methods inherited from Residue
#%, #&, #+, #-, #<<, #>>, #[], _china, #_column_for_week_included, _day_of_week, #_enumerator, #_range_for_week_included, day_of_week, #difference, #duration, #event, #initialize, mod, #to, #to_m17n, #to_s
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
Constructor Details
This class inherits a constructor from When::Coordinates::Residue
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Coordinates::Residue
Instance Method Details
#_day_notes(notes = {}, dates = nil, conditions = {}) ⇒ Object
日の十干で決まる暦注
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/when_exe/region/japanese/residues.rb', line 126 def _day_notes(notes={}, dates=nil, conditions={}) year, month = dates.s_date.cal_date # 節月に依存する暦注 notes['復' ] ||= [[4,5],[0,6],[1,7],[4,5],[2,8],[3,9]][month % 6].include?(@remainder) ? '復' : nil # 不断の暦注 notes['不視病'] ||= @remainder == 4 ? '不視病' : nil notes['不問疾'] ||= @remainder == 5 ? '不問疾' : nil # 凶会日に省略される吉日 return notes if notes['凶会'] # 節年に依存する暦注 notes['歳徳' ] ||= @remainder == [6,2,8,4,0][year % 5] ? '歳徳' : nil notes['歳徳' ] ||= @remainder == [1,7,3,9,5][year % 5] ? '歳徳合' : nil # 節月に依存する暦注 notes['月徳' ] ||= @remainder == [6,2,0,8][month % 4] ? '月徳' : nil notes['月徳' ] ||= @remainder == [1,7,5,3][month % 4] ? '月徳合' : nil notes end |
#_month_notes(notes = {}, dates = nil, conditions = {}) ⇒ Object
月の十干で決まる暦注(ダミー)
119 120 121 |
# File 'lib/when_exe/region/japanese/residues.rb', line 119 def _month_notes(notes={}, dates=nil, conditions={}) notes end |
#_year_notes(notes = {}, dates = nil, conditions = {}) ⇒ Object
年の十干で決まる暦注
110 111 112 113 114 |
# File 'lib/when_exe/region/japanese/residues.rb', line 110 def _year_notes(notes={}, dates=nil, conditions={}) notes['歳徳'] ||= Rules['歳徳'][@remainder] notes['金神'] ||= Rules['金神'][@remainder % 5] notes end |