fudo3 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d9445b7ca318f8f8f34c05750fbcd611b6a93699b308ca86a4692fda4cc6fb8
4
- data.tar.gz: 5fbf5edb9d4d81a9b276bf065a9ed65e475c7f572416aac4c0cb98a482972376
3
+ metadata.gz: 0031106f8bed15d4a1df2fdc10405539dfd5336aaf8edc5ec8ff5e1d5de36122
4
+ data.tar.gz: 2587fad51d466b39f6f05c53285e4814fa2ce65adf769840912e51e815ac8614
5
5
  SHA512:
6
- metadata.gz: e0d353de5d6d1e8b01b7214bf909ccbc2d98d7dc2caf85ee8712bbbc2b47ea3f3eca65f3bbebfcbeebe097b1de9cfe04950592068e73d08e51ae3fc4cf07687e
7
- data.tar.gz: '0915014b17d863d69be17987cb291756ce2986620fe108e8a30e2150796a13c0d232352c2431c0f1ed582c86fc43f37630a03404dfb2c187121a22adb1b672b6'
6
+ metadata.gz: 5723389314746c3106b3d2fd154c3c04eed67ebe7c1dd8eb1c06363f57a22e124560ba6591346a628f78ae9273e3df5b021c8ef3b3da3e929b30f28bda8a333c
7
+ data.tar.gz: bc6b57063a25f9c48ab16f7e21df472d15420031323794e55ea0adcf99a1ca4a0594086be30dedb3b9e27fd91e34f28119a870633ce1633f572724c46722cd6a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fudo3 (0.1.0)
4
+ fudo3 (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -7,37 +7,68 @@ module Fudo3
7
7
  JO_BASE = 1.6562
8
8
 
9
9
  # 平米 → 坪 変換
10
+ # @param [Float] heibei 平米
11
+ # @return [Float] 坪
10
12
  def self.heibei_to_tsubo(heibei)
11
- heibei / TSUBO_BASE
13
+ heibei.to_f / TSUBO_BASE
12
14
  end
13
15
 
14
16
  # 平米 → 畳 変換
17
+ # @param [Float] heibei 平米
18
+ # @return [Float] 畳
15
19
  def self.heibei_to_jo(heibei)
16
- heibei / JO_BASE
20
+ heibei.to_f / JO_BASE
17
21
  end
18
22
 
19
23
  # 坪 → 平米 変換
24
+ # @param [Float] tsubo 坪
25
+ # @return [Float] 平米
20
26
  def self.tsubo_to_heibei(tsubo)
21
- tsubo * TSUBO_BASE
27
+ tsubo.to_f * TSUBO_BASE
22
28
  end
23
29
 
24
30
  # 坪 → 畳 変換
31
+ # @param [Float] tsubo 坪
32
+ # @return [Float] 畳
25
33
  def self.tsubo_to_jo(tsubo)
26
- tsubo * TSUBO_BASE / JO_BASE
34
+ tsubo.to_f * TSUBO_BASE / JO_BASE
27
35
  end
28
36
 
29
37
  # 畳 → 平米 変換
38
+ # @param [Float] jo 畳
39
+ # @return [Float] 平米
30
40
  def self.jo_to_heibei(jo)
31
- jo * JO_BASE
41
+ jo.to_f * JO_BASE
32
42
  end
33
43
 
34
44
  # 畳 → 坪 変換
45
+ # @param [Float] jo 畳
46
+ # @return [Float] 坪
35
47
  def self.jo_to_tsubo(jo)
36
- jo * JO_BASE / TSUBO_BASE
48
+ jo.to_f * JO_BASE / TSUBO_BASE
37
49
  end
38
50
 
39
51
  # 平米
40
- def self.heibei(width, height)
41
- width * height
52
+ # @param [Float] length 縦
53
+ # # @param [Float] width
54
+ # @return [Float] 平米
55
+ def self.heibei(length, width)
56
+ length.to_f * width.to_f
57
+ end
58
+
59
+ # 坪単価
60
+ # @param [Float] price 価格(万円)
61
+ # @param [Float] tsubo 坪
62
+ # @return [Float] 坪単価
63
+ def self.price_per_tsubo(price, tsubo)
64
+ price.to_f / tsubo.to_f
65
+ end
66
+
67
+ # 平米単価
68
+ # @param [Float] price 価格(万円)
69
+ # @param [Float] heibei 平米
70
+ # @return [Float] 平米単価
71
+ def self.price_per_heibei(price, heibei)
72
+ price.to_f / heibei.to_f
42
73
  end
43
74
  end
@@ -1,3 +1,3 @@
1
1
  module Fudo3
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fudo3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shuhei Yamashita
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2020-09-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 不動産で使用する関数をまとめたgemです。
14
14
  email: