four-pillars 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/four-pillars.rb +21 -0
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18d987f64867a28d0a64cea6886aee79a61476b53c1cf91c93559da858f59227
4
- data.tar.gz: d7f44a5de0f4964f10b5b6e5c0c675fb4af548dfb311e294816df976f2abcea8
3
+ metadata.gz: 4f0b8c051671af718c90ac4cc6e63f328b45ab58b1dc66de1bcd5cccec592b51
4
+ data.tar.gz: b9980ff4b7836ce0f41f625f6d8b7408fb2fdd67eb2e68401c82335f6a0141b3
5
5
  SHA512:
6
- metadata.gz: 536e40e55e5048294c7860db6248c7952ad4fab6df5744e94d08ed9268f991b3e26c064d63dd153eba058ab702ebab45413da8d3bf6e49627ec135d59a973f33
7
- data.tar.gz: 599bf9f4f3f340d1869ae934229c544afab4d9a0a20c4d6ea9096d83175790ee6947c0a203f6518cf466cbb4fd63b584639cdabb4666eb4c07c8779440720275
6
+ metadata.gz: f50990650a105160b856d434a1e775147821005e19ca2e3e49e59145078965363223b1d36c57b0955003799545859142f656a8b0ae9af143567b99d5ebb1a4ec
7
+ data.tar.gz: 706961821addf96f7fb0aab4142379891e2dbc0d3596174f16a009bfd7735bc93afb9f51b7bce05a4de4e05b7bb394b11b184726c3e6f61aeda72b818c962a02
data/lib/four-pillars.rb CHANGED
@@ -313,12 +313,33 @@ class FourPillarsLogic
313
313
  return arr
314
314
  end
315
315
 
316
+ # 守護神
316
317
  def shugoshin
317
318
  # 日柱の十干と月柱の十二支
318
319
  x = JIKKAN.index(kanshi[0][0])
319
320
  y = JYUNISHI.index(kanshi[1][1])
320
321
  SHUGOSHIN[y][x]
321
322
  end
323
+
324
+ def shukumei
325
+ s = []
326
+ t = kuubou # 天中殺 0:上段, 1:下段
327
+ k = kanshi.map {|v| v[1] } # 日,月,年柱の干支
328
+ if t[0].include? k[2]
329
+ s += ["生年中殺"]
330
+ end
331
+ if t[0].include? k[1]
332
+ s += ["生月中殺"]
333
+ end
334
+ if t[1].include? k[0]
335
+ s += ["生日中殺"]
336
+ end
337
+ f = false
338
+ f = true if kanshi_as_number.include? 11 #甲戌
339
+ f = true if kanshi_as_number.include? 12 #乙亥
340
+ s += ["日座中殺"] if f
341
+ return s
342
+ end
322
343
  end
323
344
 
324
345
  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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yosei Ito
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-19 00:00:00.000000000 Z
11
+ date: 2021-05-29 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
@@ -22,7 +22,7 @@ homepage: https://github.com/lumbermill/four-pillars
22
22
  licenses:
23
23
  - MIT
24
24
  metadata: {}
25
- post_install_message:
25
+ post_install_message:
26
26
  rdoc_options: []
27
27
  require_paths:
28
28
  - lib
@@ -37,8 +37,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  requirements: []
40
- rubygems_version: 3.0.3
41
- signing_key:
40
+ rubygems_version: 3.2.15
41
+ signing_key:
42
42
  specification_version: 4
43
43
  summary: Four Pillar astrology
44
44
  test_files: []