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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fudo3.rb +39 -8
- data/lib/fudo3/version.rb +1 -1
- 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: 0031106f8bed15d4a1df2fdc10405539dfd5336aaf8edc5ec8ff5e1d5de36122
|
4
|
+
data.tar.gz: 2587fad51d466b39f6f05c53285e4814fa2ce65adf769840912e51e815ac8614
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5723389314746c3106b3d2fd154c3c04eed67ebe7c1dd8eb1c06363f57a22e124560ba6591346a628f78ae9273e3df5b021c8ef3b3da3e929b30f28bda8a333c
|
7
|
+
data.tar.gz: bc6b57063a25f9c48ab16f7e21df472d15420031323794e55ea0adcf99a1ca4a0594086be30dedb3b9e27fd91e34f28119a870633ce1633f572724c46722cd6a
|
data/Gemfile.lock
CHANGED
data/lib/fudo3.rb
CHANGED
@@ -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
|
-
|
41
|
-
|
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
|
data/lib/fudo3/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 不動産で使用する関数をまとめたgemです。
|
14
14
|
email:
|