scalar 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scalar/length.rb +2 -0
- data/lib/scalar/version.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2982f2f0df447e30ec95f786453cc4e028e08e06
|
4
|
+
data.tar.gz: a8243dc7371a7cd637755bb126c973a193246313
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4290e8e30e360aff32c4c25727b61210ea09cbae6f168757395f90b028c5769c76f9cf8ed9f6ae30c394d9d2bf74b243a0bc64d41d6c8e855d98f871a29d5531
|
7
|
+
data.tar.gz: 0fb0077f48e007777a0b8d70edf16ed4ca80563fa49b9a81c6331508d31a64d7e4cab8ebc284f9a33f7597f3019c7db9e08be8ec0aa686d397a0a8b3a3839d14
|
data/lib/scalar/length.rb
CHANGED
@@ -8,6 +8,7 @@ module Scalar
|
|
8
8
|
self.alias_map = {
|
9
9
|
meters: %i(m),
|
10
10
|
kilometers: %i(km),
|
11
|
+
centimeters: %i(cm),
|
11
12
|
millimeters: %i(mm),
|
12
13
|
feet: %i(ft),
|
13
14
|
inches: %i(in),
|
@@ -17,6 +18,7 @@ module Scalar
|
|
17
18
|
|
18
19
|
CONVERSIONS = SupportClasses::ConversionTable.new(base_unit: :meters)
|
19
20
|
CONVERSIONS.add name: :kilometers, base_unit_per: 1000
|
21
|
+
CONVERSIONS.add name: :centimeters, base_unit_per: 0.01
|
20
22
|
CONVERSIONS.add name: :millimeters, base_unit_per: 0.001
|
21
23
|
CONVERSIONS.add name: :feet, base_unit_per: 0.3048
|
22
24
|
CONVERSIONS.add name: :inches, base_unit_per: 0.3048 / 12
|
data/lib/scalar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scalar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelly Stannard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.6.13
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Thin and performant measurement library
|