hexhelper 0.0.1 → 0.0.2

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 +22 -1
  3. data/lib/hexhelper/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09ced30dd9c164580fc5ae58cdb57017754b6163
4
- data.tar.gz: 684781351e0bd8bcf0b3f5b8e316226600b431d6
3
+ metadata.gz: 3b6cea0da58d9efcbb5f7b35d67cb831aa8f156c
4
+ data.tar.gz: af3b60fbdf23bbfe5eb414da69586332726fe95b
5
5
  SHA512:
6
- metadata.gz: 9dc22a33d841058aceb7affed3d243da28c0b2d9d0185c17c0a51147e83a7077c374adf526ac1478d9e87b62d26eb51602ad31c19493ab725877e6ce3eb33743
7
- data.tar.gz: d4b4882c9a1a78c0cdaf6731ab11c3bf8334663a07205bd95ea353a72f3f4cb05bdf86dccc83c32a379afc40f0c3f51a8a5ea29aff0584e5fb4c1ac59b4ed55c
6
+ metadata.gz: 763e375faa501e97c887c7401bfd2bd3bb77e9c62a0de657db11ed28adb0fb6a68141bc6582704756c69a53dc2ec11bd124558b44108d8876041de19c1d7f8f4
7
+ data.tar.gz: aa5127f54de196c13e6ae3ce580135a6fbec7a7cfeecb7b2bcfd0bc59ded687f190def4d1f66536b05892653d2aa0220ec64d2eadd3137004bd832e80fe7e63a
data/README.md CHANGED
@@ -29,7 +29,28 @@ Using it is simple!
29
29
  require 'hexhelper'
30
30
 
31
31
  str = "This is a test string\x00\x01\x02"
32
- puts Hexhelper::to_s(str)
32
+ puts HexHelper::to_s(str)
33
+ ```
34
+
35
+ Which generates:
36
+
37
+ ```
38
+ irb(main):001:0> require 'hexhelper'
39
+ => true
40
+ irb(main):002:0> str = "This is a test string \x00\x01\x02"
41
+ => "This is a test string \u0000\u0001\u0002"
42
+ irb(main):003:0> puts HexHelper::to_s(str)
43
+ 00000000 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 73 This.is.a.test.s
44
+ 00000010 74 72 69 6e 67 20 00 01 02 tring....
45
+ ```
46
+
47
+ It's also possible to indent with the `indent` parameter, and to highlight a
48
+ particular offset with the `offset` parameter:
49
+
50
+ ```
51
+ irb(main):004:0> puts HexHelper::to_s(str, indent: 4, offset: 0x10)
52
+ 00000000 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 73 This.is.a.test.s
53
+ 00000010 <74>72 69 6e 67 20 00 01 02 tring....
33
54
  ```
34
55
 
35
56
  ## Contributing
@@ -1,3 +1,3 @@
1
1
  module Hexhelper
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hexhelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - iagox86