tobinary 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 497fcc9b32b3dda54154157da89b1a137bfd8e40
4
- data.tar.gz: f05dadaf50178b85bed4e5c28d8ffaa805706ea5
3
+ metadata.gz: f4121fc579f29a249d26de1b11dac6c3f9b46829
4
+ data.tar.gz: 78574f310be2a14d30d35dfd7450a1bed847ecea
5
5
  SHA512:
6
- metadata.gz: 518ed16fe685ab0714a76c07e91a73c2b56a5314b39133024f1bb19ff597a7a3d66e5f6546790dddf4cd6a3db7e5b6c1c0d950975aebe664ce1d1bd4d42f67c4
7
- data.tar.gz: 073871881e7649b714ab083b5295110c246e33dc3a1794c72472e6b17922ed536bb8e71ae12503702b986623e2c27ac21bcff08e342a8ce0bf5fe1ecd38a7205
6
+ metadata.gz: 30b7b37d3bb6690200b88dcaaa480a23e6c94add568d518412af524a189a774572fe3a213143c4d8f184c3d7d09eb1aa415aca6557d4a2921211b23b3f57462a
7
+ data.tar.gz: b794fda64e045dec3e74c4869de9079877b06d4d08550d4c2d154fa2de67ef98401e6d687f313408410dbbadbfde82266f1dc28b7262db303d57ee89a4e59d37
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tobinary (1.0.0)
4
+ tobinary (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # Tobinary
1
+ # tobinary
2
2
 
3
3
  Ruby Gem that allows you to convert any number into binary easily.
4
4
 
5
5
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tobinary`. To experiment with that code, run `bin/console` for an interactive prompt.
6
6
 
7
- TODO: Delete this and the text above, and describe your gem
7
+ You can also check the rubygems.org link https://rubygems.org/gems/tobinary
8
8
 
9
9
  ## Installation
10
10
 
@@ -24,7 +24,11 @@ Or install it yourself as:
24
24
 
25
25
  ## Usage
26
26
 
27
- TODO: Write usage instructions here
27
+ Just call `.to_binary`on any decimal number lower than 65536 (will be enchanced :) ) and it will return you the binary version of it.
28
+
29
+ ` 3.to_binary ` will give you ` 11 `
30
+ ` 30.to_binary ` will give you ` 00011110 `
31
+ ` 65535.to_binary ` will give you ` 1111111111111111 `
28
32
 
29
33
  ## Development
30
34
 
@@ -34,4 +38,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
34
38
 
35
39
  ## Contributing
36
40
 
37
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tobinary. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
41
+ Bug reports and pull requests are welcome on GitHub at https://github.com/recepinanc/tobinary. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -20,7 +20,7 @@ module Tobinary
20
20
  if number == 1
21
21
  digits[index] = 1
22
22
  else
23
- while number > 2
23
+ while number >= 2
24
24
  reminder = number %2
25
25
  digits[index] = reminder
26
26
  index -= 1
@@ -1,3 +1,3 @@
1
1
  module Tobinary
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tobinary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - recepinanc