to_decimal 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/lib/to_decimal/to_decimal_class.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 718f822ef696b84cb34b6992cdd5f36dc7d432a4f03b3a9a1b2c6c3d53eea61b
|
4
|
+
data.tar.gz: cef1615b1c378f2f148b2c5781307cf8a0ee55d5513470cee3dad81497fc7bae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9289a2685a665184fba5a416d7500dc1cd820135490a9e221f362281992230e2cb02eb6ee8a0db56832aab50ca026affe06cde938c16557ab47d309e23c17929
|
7
|
+
data.tar.gz: c7ad1939a6e33d80b384a0ddce212e2ad2f59cb58a5cd51238c64c3f87839d96e426c91e4be17528169ee1d0c26f94fec897c3655df56c7573a3c15fcce7c75e
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -79,21 +79,21 @@ base8.base = '3'
|
|
79
79
|
```
|
80
80
|
|
81
81
|
To convert a number of a given base to a base 10 integer, use the `#to_d(input)`
|
82
|
-
method (alias `#
|
82
|
+
method (alias `#[]`):
|
83
83
|
|
84
84
|
```ruby
|
85
85
|
base8.to_d(12) # => 10
|
86
86
|
|
87
87
|
# alias
|
88
88
|
|
89
|
-
|
89
|
+
base8[12] # => 10
|
90
90
|
```
|
91
91
|
An error wil be raised if the input integer is not of the given base.
|
92
92
|
|
93
93
|
### Class method
|
94
94
|
|
95
95
|
Instead of creating a new object, you can also call a class method `#to_d` on
|
96
|
-
the ToDecimal class itself :
|
96
|
+
the `ToDecimal class itself :
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
ToDecimal.to_d(1231, base: 4)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: to_decimal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurent Guinotte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,6 +74,7 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- CHANGELOG.md
|
77
78
|
- Gemfile
|
78
79
|
- Gemfile.lock
|
79
80
|
- LICENCE.txt
|
@@ -86,7 +87,9 @@ files:
|
|
86
87
|
homepage: https://github.com/loranger32/to_decimal
|
87
88
|
licenses:
|
88
89
|
- MIT
|
89
|
-
metadata:
|
90
|
+
metadata:
|
91
|
+
source_code_uri: https://github.com/loranger32/to_decimal
|
92
|
+
changelog_uri: https://github.com/blob/master/CHANGELOG.md
|
90
93
|
post_install_message:
|
91
94
|
rdoc_options: []
|
92
95
|
require_paths:
|
@@ -95,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
95
98
|
requirements:
|
96
99
|
- - ">="
|
97
100
|
- !ruby/object:Gem::Version
|
98
|
-
version: 2.
|
101
|
+
version: 2.4.1
|
99
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
103
|
requirements:
|
101
104
|
- - ">="
|