four-pillars 0.1.8 → 0.1.10
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-setsuiri.txt +1 -1
- data/lib/four-pillars.rb +9 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3aea37ba5dcf75ab1e43016b9714bdfb764edee6caef59224d320ff630ba6667
|
4
|
+
data.tar.gz: da2aea2cb270e68f4ec22492d52d6df22312ede7d8f408503c2e01ce1c6619a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a158ad4720f46597b970c98919d113902680a5b682af608ad9f4a5a0458c4f47bc4ac86fa50e8b625c6e31c0da15fc48dcc415db7bd718b913a318c5b123ccb9
|
7
|
+
data.tar.gz: cf06e21200c9c684fc9b1e0a2149b0306e8ec4fae8110ce75845d788dc70f29eadcdc22c2d6df109d59967b4f40b1fc69553f5b9a1b5ae91e76b7b2a01e4896d
|
data/lib/four-pillars.rb
CHANGED
@@ -86,8 +86,7 @@ class FourPillarsLogic
|
|
86
86
|
|
87
87
|
# 通変星
|
88
88
|
def self.tsuhensei(j_day,j_src) # 日柱の十干、月柱または年柱の十干
|
89
|
-
|
90
|
-
if j % 2 == 0 # 陽
|
89
|
+
if plus_jikkan?(j_day) # 陽
|
91
90
|
jikkan = JIKKAN
|
92
91
|
else # 陰
|
93
92
|
jikkan = JIKKAN_IN
|
@@ -109,10 +108,15 @@ class FourPillarsLogic
|
|
109
108
|
JYUNIUNSEI[(ji + offset) % 12]
|
110
109
|
end
|
111
110
|
|
112
|
-
#
|
111
|
+
# 十干の陰陽 陽:true 陰:false
|
112
|
+
def self.plus_jikkan?(jikkan)
|
113
|
+
i = JIKKAN.index(jikkan)
|
114
|
+
raise "Invalid jikkan: #{jikkan}" if i.nil?
|
115
|
+
return i % 2 == 0
|
116
|
+
end
|
113
117
|
|
114
118
|
# 生年月日時間, 性別(大運の向きに使用)
|
115
|
-
attr_reader :birth_dt
|
119
|
+
attr_reader :birth_dt, :gender
|
116
120
|
|
117
121
|
def initialize(birth_dt,gender)
|
118
122
|
@birth_dt = birth_dt.map {|v| v.to_i }
|
@@ -292,6 +296,7 @@ class FourPillarsLogic
|
|
292
296
|
[d,m,y]
|
293
297
|
end
|
294
298
|
|
299
|
+
# 十二運星エネルギー
|
295
300
|
def jyuniunsei_energy
|
296
301
|
jyuniunsei.map {|v| JYUNIUNSEI_ENERGY[v] }
|
297
302
|
end
|
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.10
|
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: 2022-12-07 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
|
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
|
-
rubygems_version: 3.
|
40
|
+
rubygems_version: 3.3.7
|
41
41
|
signing_key:
|
42
42
|
specification_version: 4
|
43
43
|
summary: Four Pillar astrology
|