binToDec 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd7589ee2f37f6235a26c4b819399715d2149a5e
4
- data.tar.gz: a0cddca7d6215cc9055091579de232394d92caa1
3
+ metadata.gz: 106d85904286c4c404981d6f06e6f5376c3d0641
4
+ data.tar.gz: f7c191e6015521bebba99092ab7210c92d70e5d5
5
5
  SHA512:
6
- metadata.gz: 766213a9a8470ef7b567fde6c2f2c0a1f9e0a3e3b3cfcf4643fa95b9519e5d02edd7857c199bdb2d209cc5201cf82f67406d6a7439095346c564117f4cfff345
7
- data.tar.gz: 7952295fbc0bdd2f9f40cd2e4b0a5e3bdbbe55b550e0bc0b5d9a5c28f043ee20c9c5d88f9a9ad9f5b17fb9ddc1a92cf9d994b82dad1fad68f6078202ad89e6b3
6
+ metadata.gz: 231098ae0361ed08209e2ab76627acee97ef010b394bed52ce83716192fbdf68efb0533129947199bbbbd13c3ae29ee5cb2db177406c25c2195ccd7010b26390
7
+ data.tar.gz: 06cd1aa300f562b5c271ffe8879be04eef39dd7c39d53141711f2539c96181d669a7fc8359fba1ad110fbc714df73c343e242fad41a4aec08b8c38122f7d310b
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Binary to Decimal Conversion (binToDec)
2
+ [![Gem Version](https://badge.fury.io/rb/binToDec.png)](http://badge.fury.io/rb/binToDec)
2
3
 
3
- binToDec is written in Ruby, and converts a binary number to a decimal only if
4
+ **binToDec** is written in Ruby, and converts a binary number to a decimal only if
4
5
  the argument is binary.
5
6
 
6
7
  It should be considered an experimental gem.
@@ -28,14 +29,14 @@ Converter.bintoDec(2)
28
29
  ## Basis
29
30
  The program uses the following test to determine if the input is binary:
30
31
 
31
- arg1.to\_s.split(//).map { |i| i.to\_i }.find\_all { |value| value > 0 }.inject(:*)
32
+ `arg1.to_s.split(//).map { |i| i.to_i }.find_all { |value| value > 0 }.inject(:*)`
32
33
 
33
34
 
34
35
  The program uses the following code to convert the input (arg1) to binary.
35
36
 
36
- arg1.to\_s.split(//).map { |i| i.to\_i }.inject(0) { |accumulator, value| (accumulator + value) * 2 }
37
+ `arg1.to_s.split(//).map { |i| i.to_i }.inject(0) { |accumulator, value| (accumulator + value) * 2 }`
37
38
 
38
- return result/2
39
+ `return result/2`
39
40
 
40
41
 
41
42
  ## Contributing
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binToDec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - tomgdow