bits_in_bytes 0.1.2 → 0.1.3

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +57 -57
  3. data/lib/core/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fee2b65cecbf81a180d8f488084ecdb318156728af08484136c2b89c87b6fd0
4
- data.tar.gz: abbe2d5b610f681e55d165cd282009ca301feee9a018eb7ebe3403af354a9d2c
3
+ metadata.gz: 35eb08bcf54f9964566197e1dd1dae9ebb8a50f0e1dd9f4b9b71281838cecc2e
4
+ data.tar.gz: b7eadbd9d858abb8b9b8690eff2fae1319c00628392ec7b8972aea1199fb2f45
5
5
  SHA512:
6
- metadata.gz: 5044c967008eb994ef694f80bc168e0186a69bce53c3d5b17cbcb6df15da114148bfd74709d286dbc9793ddb00c8af34bd1fb38690785e0d6b5e7db620ffc979
7
- data.tar.gz: d944481948d8fa06ea6686469beb4c4bf9384f4988b384a06a047e614c57caabcbd73ffc8806a7ca76441c560b0df31e17182690db25ff4b526122c9e1d7ede4
6
+ metadata.gz: 1a371b898bf59fa12a1c61f8628c6fdb31dc9bbcf7a37f9c258f9fad1966d1a469a49b6f09c24bd911fe9ba17ee711c499e45c93b26ee4f8fa8cb48207017fe4
7
+ data.tar.gz: 2bf31f73292dce17a80a4998b9efb719e9895d75d2ba83a1504790137f29c5acc344d33909d76c829c2b8ade10c068af6ec8ab271fa4869ba1ee5b8d179b03ac
data/README.md CHANGED
@@ -1,57 +1,57 @@
1
- # BitsInBytes
2
-
3
- 'BitsInBytes' is a ruby gem which allows the user to determine what bits are set
4
- in a byte in an object oriented way.
5
-
6
- ## Installation
7
-
8
- Add this line to your application's Gemfile:
9
-
10
- ```ruby
11
- gem 'bits_in_bytes'
12
- ```
13
-
14
- And then execute:
15
-
16
- $ bundle
17
-
18
- Or install it yourself as:
19
-
20
- $ gem install bits_in_bytes
21
-
22
- ## Usage
23
-
24
- You can use the 'BitInByte' object to find out which bits are set in a given
25
- byte. The first argument is the position of the bit you would like to check.
26
- The position must be in the range of 1 to 8.
27
- The second argument is the actual byte value, which must be in the
28
- range of 0 to 255. It may be a decimal, hex, octal or binary value.
29
-
30
- Simple examples:
31
- ```ruby
32
- BitInByte.new(8, 128).value # output -> true
33
- BitInByte.new(4, 8).value # output -> false
34
- BitInByte.new(1, 17).value # output -> true
35
- BitInByte.new(3, 64).value # output -> false
36
- BitInByte.new(5, 0x10).value # output -> true
37
- BitInByte.new(7, 0b00000011).value # output -> false
38
- BitInByte.new(2, 0o12).value # output -> true
39
- ```
40
-
41
- ## Development
42
-
43
- After checking out the repo, run `bin/setup` to install dependencies.
44
- You can also run `bin/console` for an interactive prompt that will allow you to experiment.
45
-
46
- To install this gem onto your local machine, run `bundle exec rake install`.
47
- To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`,
48
- which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
-
50
- ## Contributing
51
-
52
- Bug reports and pull requests are welcome and highly appreciated on GitHub at https://github.com/SNException/bits_in_bytes.
53
-
54
- ## License
55
-
56
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
57
- See LICENSE.txt for more information.
1
+ # BitsInBytes
2
+
3
+ 'BitsInBytes' is a ruby gem which allows the user to determine what bits are set
4
+ in a byte in an object oriented way.
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'bits_in_bytes'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install bits_in_bytes
21
+
22
+ ## Usage
23
+
24
+ You can use the 'BitInByte' object to find out which bits are set in a given
25
+ byte. The first argument is the position of the bit you would like to check.
26
+ The position must be in the range of 1 to 8.
27
+ The second argument is the actual byte value, which must be in the
28
+ range of 0 to 255. It may be a decimal, hex, octal or binary value.
29
+
30
+ Simple examples:
31
+ ```ruby
32
+ BitInByte.new(8, 128).value # output -> true
33
+ BitInByte.new(4, 4).value # output -> false
34
+ BitInByte.new(1, 17).value # output -> true
35
+ BitInByte.new(3, 64).value # output -> false
36
+ BitInByte.new(5, 0x10).value # output -> true
37
+ BitInByte.new(7, 0b00000011).value # output -> false
38
+ BitInByte.new(2, 0o12).value # output -> true
39
+ ```
40
+
41
+ ## Development
42
+
43
+ After checking out the repo, run `bin/setup` to install dependencies.
44
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
45
+
46
+ To install this gem onto your local machine, run `bundle exec rake install`.
47
+ To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`,
48
+ which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
+
50
+ ## Contributing
51
+
52
+ Bug reports and pull requests are welcome and highly appreciated on GitHub at https://github.com/SNException/bits_in_bytes.
53
+
54
+ ## License
55
+
56
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
57
+ See LICENSE.txt for more information.
data/lib/core/version.rb CHANGED
@@ -20,5 +20,5 @@
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  # THE SOFTWARE.
22
22
  module BitsInBytes
23
- VERSION = '0.1.2'
23
+ VERSION = '0.1.3'
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bits_in_bytes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niklas Schultz