Class: When::Coordinates::Wuku
- Inherits:
-
Residue
- Object
- BasicTypes::Object
- Residue
- When::Coordinates::Wuku
- Defined in:
- lib/when_exe/region/balinese.rb
Overview
ウク周期
Constant Summary collapse
- Urip7 =
Urip 7
[ 5, 4, 3, 7, 8, 6, 9]
- Urip5 =
Urip 5
[ 9, 7, 4, 8, 5]
- Dwiwara =
2日週
(0...35).to_a.map {|d| (Urip7[d % 7] + Urip5[d % 5]) % 2}
- Dasawara =
10日週
(0...35).to_a.map {|d| (Urip7[d % 7] + Urip5[d % 5]) % 10}
- Watek =
Watek
(0...35).to_a.map {|d| Urip7[d % 7] + Urip5[d % 5] - 7 }
Constants inherited from Residue
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 Residue
#carry, #divisor, #remainder, #shifted, #units
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#astawara ⇒ When::BasicTypes::M17n
8日週.
-
#dasawara ⇒ When::BasicTypes::M17n
10日週.
-
#dwiwara ⇒ When::BasicTypes::M17n
2日週.
-
#sangawara ⇒ When::BasicTypes::M17n
9日週.
-
#tjaturwara ⇒ When::BasicTypes::M17n
4日週.
-
#watek ⇒ When::BasicTypes::M17n
Watek.
Methods inherited from Residue
#%, #&, #+, #-, #<<, #>>, #[], _china, _day_of_week, #_enumerator, day_of_week, #difference, #duration, #event, #initialize, mod, #to, #to_m17n, #to_s
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
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
#astawara ⇒ When::BasicTypes::M17n
8日週
104 105 106 107 |
# File 'lib/when_exe/region/balinese.rb', line 104 def astawara index = (@remainder + 137) % 210 When.CalendarNote('Balinese/Notes')['day']['Astawara'][index >= 208 ? 6 : (index-1) % 8] end |
#dasawara ⇒ When::BasicTypes::M17n
10日週
118 119 120 |
# File 'lib/when_exe/region/balinese.rb', line 118 def dasawara When.CalendarNote('Balinese/Notes')['day']['Dasawara'][Dasawara[@remainder % 35]] end |
#dwiwara ⇒ When::BasicTypes::M17n
2日週
91 92 93 |
# File 'lib/when_exe/region/balinese.rb', line 91 def dwiwara When.CalendarNote('Balinese/Notes')['day']['Dwiwara'][Dwiwara[@remainder % 35]] end |
#sangawara ⇒ When::BasicTypes::M17n
9日週
111 112 113 114 |
# File 'lib/when_exe/region/balinese.rb', line 111 def sangawara index = @remainder - 3 When.CalendarNote('Balinese/Notes')['day']['Sangawara'][index < 0 ? 0 : index % 9] end |
#tjaturwara ⇒ When::BasicTypes::M17n
4日週
97 98 99 100 |
# File 'lib/when_exe/region/balinese.rb', line 97 def tjaturwara index = (@remainder + 137) % 210 When.CalendarNote('Balinese/Notes')['day']['Tjaturwara'][index >= 208 ? 2 : (index-1) % 4] end |
#watek ⇒ When::BasicTypes::M17n
Watek
124 125 126 |
# File 'lib/when_exe/region/balinese.rb', line 124 def watek When.CalendarNote('Balinese/Notes')['day']['Watek'][Watek[@remainder % 35]] end |