four-pillars 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/four-pillars.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18d987f64867a28d0a64cea6886aee79a61476b53c1cf91c93559da858f59227
|
4
|
+
data.tar.gz: d7f44a5de0f4964f10b5b6e5c0c675fb4af548dfb311e294816df976f2abcea8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 536e40e55e5048294c7860db6248c7952ad4fab6df5744e94d08ed9268f991b3e26c064d63dd153eba058ab702ebab45413da8d3bf6e49627ec135d59a973f33
|
7
|
+
data.tar.gz: 599bf9f4f3f340d1869ae934229c544afab4d9a0a20c4d6ea9096d83175790ee6947c0a203f6518cf466cbb4fd63b584639cdabb4666eb4c07c8779440720275
|
data/lib/four-pillars.rb
CHANGED
@@ -7,6 +7,18 @@ class FourPillarsLogic
|
|
7
7
|
JYUNIUNSEI = ["長生","沐浴","冠帯","建禄","帝旺","衰","病","死","墓","絶","胎","養"]
|
8
8
|
GOGYO = ["木","火","土","金","水"]
|
9
9
|
KUUBOU = ["戌亥","申酉","午未","辰巳","寅卯","子丑"]
|
10
|
+
SHUGOSHIN = [["丁庚丙","丙戊","壬戊","甲庚","丙甲","丙甲戊","丁甲戊","丙壬","戊丙","丙辛"],
|
11
|
+
["丁庚甲","丙甲","甲壬","甲庚","丙甲","丙甲","丙甲丁","丙壬甲","丙甲","丙壬戊"],
|
12
|
+
["丙癸","丙癸","壬庚","甲庚","丙甲癸","丙戊甲","丙甲戊","己壬庚","庚丙戊","辛丙"],
|
13
|
+
["庚丁丙","丙癸","壬庚己","庚甲","丙甲癸","甲丙癸","丁甲庚","壬甲","戊辛","庚辛"],
|
14
|
+
["庚丁壬","癸丙","壬甲","甲庚","甲丙癸","丙甲癸","甲丁","壬甲","甲庚","丙甲辛"],
|
15
|
+
["癸庚丁","癸辛","壬庚","甲庚","甲癸丙","癸丙辛","壬戊丙","壬癸甲","壬庚辛","辛壬"],
|
16
|
+
["癸丁庚","癸丙","壬庚","壬庚","壬甲丙","癸丙辛","壬癸庚","壬癸乙","癸庚辛","辛壬"],
|
17
|
+
["癸","癸丙甲","壬庚","甲壬","丙癸甲","癸丙","丁甲","壬甲庚","辛甲","辛壬癸"],
|
18
|
+
["庚丁壬","丙癸","壬戊","甲庚丙","丙癸甲","丙癸","丁甲","壬甲","戊丁","丁甲"],
|
19
|
+
["癸庚丁甲","丙癸","壬","甲庚丙","丙癸","丙癸","丁甲丙","壬","甲庚","辛丙"],
|
20
|
+
["癸庚丁甲","癸辛甲","甲壬","甲庚","甲丙癸","甲丙","甲壬","壬甲","甲丙戊","辛甲癸"],
|
21
|
+
["癸丁丙戊","丙戊","甲戊庚","甲庚","甲丙","丙甲戊","丁甲丙","壬丙","戊丙庚","辛戊"]]
|
10
22
|
|
11
23
|
# 60干支表
|
12
24
|
def self.kanshi_array
|
@@ -300,6 +312,13 @@ class FourPillarsLogic
|
|
300
312
|
end
|
301
313
|
return arr
|
302
314
|
end
|
315
|
+
|
316
|
+
def shugoshin
|
317
|
+
# 日柱の十干と月柱の十二支
|
318
|
+
x = JIKKAN.index(kanshi[0][0])
|
319
|
+
y = JYUNISHI.index(kanshi[1][1])
|
320
|
+
SHUGOSHIN[y][x]
|
321
|
+
end
|
303
322
|
end
|
304
323
|
|
305
324
|
if __FILE__ == $0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: four-pillars
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yosei Ito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A class which tells fortune by Four Pillar astrology(四柱推命).
|
14
14
|
email: y-itou@lumber-mill.co.jp
|