simple_unit_converter 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/lib/conversion/area_conversions.rb +6 -6
- data/lib/conversion/motion_conversions.rb +4 -4
- data/lib/helper/prefixes.rb +4 -4
- data/lib/unit/area_units.rb +6 -6
- data/lib/unit/motion_units.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea40b4c6fee903fb32391daf5b169ab6ab311c2a01df1f0565ea75023c145c38
|
4
|
+
data.tar.gz: 8e2e63132905f6c452fa84daa40c540657ff5a5a8b89552a33f2971dd9beea99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09f696fca9fca92db68343bbf4daf77e501f56d35c749664f8b3340dae0d6249f9431403c3ddfcd66c4419b6b0527744791bac3dec6668d0a57e21f7cdf22595'
|
7
|
+
data.tar.gz: 8487e7a98eb96b503060c7291c1c17032c8860069424e1c3d1e3dd59de7f8f3fcbbf4f35bcf1b0290a51e2aa72958881d9725ee103cbc236ea79f01c3d168de0
|
@@ -10,32 +10,32 @@ module AreaConversion
|
|
10
10
|
def to_square_centimeter
|
11
11
|
self/(centimeter**2)
|
12
12
|
end
|
13
|
-
alias :to_square_centimeter
|
13
|
+
alias :to_centimeter_square :to_square_centimeter
|
14
14
|
|
15
15
|
def to_square_inch
|
16
16
|
self/(inch**2)
|
17
17
|
end
|
18
|
-
alias :
|
18
|
+
alias :to_inch_square :to_square_inch
|
19
19
|
|
20
20
|
def to_square_foot
|
21
21
|
self/(foot**2)
|
22
22
|
end
|
23
|
-
alias :
|
23
|
+
alias :to_foot_square :to_square_foot
|
24
24
|
|
25
25
|
def square_yard
|
26
26
|
self/(yard**2)
|
27
27
|
end
|
28
|
-
alias :
|
28
|
+
alias :to_yard_square :to_square_yard
|
29
29
|
|
30
30
|
def to_square_mile
|
31
31
|
self/(mile**2)
|
32
32
|
end
|
33
|
-
alias :
|
33
|
+
alias :to_mile_square :to_square_mile
|
34
34
|
|
35
35
|
def to_square_kilometer
|
36
36
|
self/(kilometer**2)
|
37
37
|
end
|
38
|
-
alias :
|
38
|
+
alias :to_kilometer_square :to_square_kilometer
|
39
39
|
|
40
40
|
def to_hectare
|
41
41
|
self/(100**2)
|
@@ -6,22 +6,22 @@ module MotionConversion
|
|
6
6
|
def to_kilometer_per_hour
|
7
7
|
self/(kilometer/hour)
|
8
8
|
end
|
9
|
-
alias :
|
9
|
+
alias :to_kmph :to_kilometer_per_hour
|
10
10
|
|
11
11
|
+ def to_mile_per_hour
|
12
12
|
self/(mile/hour)
|
13
13
|
end
|
14
|
-
alias :
|
14
|
+
alias :to_mph :to_miles_per_hour
|
15
15
|
|
16
16
|
def to_meter_per_second
|
17
17
|
self
|
18
18
|
end
|
19
|
-
alias :
|
19
|
+
alias :to_mps :to_meter_per_second
|
20
20
|
|
21
21
|
def to_foot_per_second
|
22
22
|
self/(foot)
|
23
23
|
end
|
24
|
-
alias :
|
24
|
+
alias :to_fps :to_foot_per_second
|
25
25
|
|
26
26
|
def to_knot
|
27
27
|
self*1.94384
|
data/lib/helper/prefixes.rb
CHANGED
@@ -27,22 +27,22 @@ module Prefix
|
|
27
27
|
def kilo
|
28
28
|
1000
|
29
29
|
end
|
30
|
-
alias :
|
30
|
+
alias :thousand :kilo
|
31
31
|
|
32
32
|
def mega
|
33
33
|
1000*kilo
|
34
34
|
end
|
35
|
-
alias :
|
35
|
+
alias :million :mega
|
36
36
|
|
37
37
|
def giga
|
38
38
|
1000*mega
|
39
39
|
end
|
40
|
-
alias :
|
40
|
+
alias :billion :giga
|
41
41
|
|
42
42
|
def tera
|
43
43
|
1000*giga
|
44
44
|
end
|
45
|
-
alias :
|
45
|
+
alias :trillion :tera
|
46
46
|
|
47
47
|
def peta
|
48
48
|
1000*tera
|
data/lib/unit/area_units.rb
CHANGED
@@ -11,32 +11,32 @@ module AreaUnit
|
|
11
11
|
def square_centimeter
|
12
12
|
self*(centimeter**2)
|
13
13
|
end
|
14
|
-
alias :
|
14
|
+
alias :centimeter_square :square_centimeter
|
15
15
|
|
16
16
|
def square_inch
|
17
17
|
self*(inch**2)
|
18
18
|
end
|
19
|
-
alias :
|
19
|
+
alias :inch_square :square_inch
|
20
20
|
|
21
21
|
def square_foot
|
22
22
|
self*(foot**2)
|
23
23
|
end
|
24
|
-
alias :
|
24
|
+
alias :foot_square :square_foot
|
25
25
|
|
26
26
|
def square_yard
|
27
27
|
self*(yard**2)
|
28
28
|
end
|
29
|
-
alias :
|
29
|
+
alias :yard_square :square_yard
|
30
30
|
|
31
31
|
def square_mile
|
32
32
|
self*(mile**2)
|
33
33
|
end
|
34
|
-
alias :
|
34
|
+
alias :mile_square :square_mile
|
35
35
|
|
36
36
|
def square_kilometer
|
37
37
|
self*(kilometer**2)
|
38
38
|
end
|
39
|
-
alias :
|
39
|
+
alias :kilometer_square :square_kilometer
|
40
40
|
|
41
41
|
def hectare
|
42
42
|
self*(100**2)
|
data/lib/unit/motion_units.rb
CHANGED
@@ -6,17 +6,17 @@ module MotionUnit
|
|
6
6
|
def mile_per_hour
|
7
7
|
self*(mile/hour)
|
8
8
|
end
|
9
|
-
alias :
|
9
|
+
alias :mph :mile_per_hour
|
10
10
|
|
11
11
|
def kilometer_per_hour
|
12
12
|
self*(kilometer/hour)
|
13
13
|
end
|
14
|
-
alias :
|
14
|
+
alias :kmph :kilo_per_hour
|
15
15
|
|
16
16
|
def foot_per_second
|
17
17
|
self*(foot)
|
18
18
|
end
|
19
|
-
alias :
|
19
|
+
alias :fps :foot_per_second
|
20
20
|
|
21
21
|
def knot
|
22
22
|
self*0.514444
|