rainbow_hash 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75e5485df1c03e6115814ddc9c55edc68b6e4765
4
- data.tar.gz: 88e8c9ac827a445779a1b1bcfa2c10c53acfafcb
3
+ metadata.gz: 18f0b29d0aa406f93c62d5315ace6cf93ea35b1d
4
+ data.tar.gz: db7f82c1133c0119707717dd21c631c26ac815e4
5
5
  SHA512:
6
- metadata.gz: 7e4912be19f735cef28735ad3edc333f32bcf5b9d8bd5b4d5b5abb4274e8c0b3b5a85802037f17d4e3a62b9b5975047d911313d05be3c337e95174095308bc72
7
- data.tar.gz: 695767fca48c8f3754e5aa57cab8f35f37fcabf0394add313c5e24844dbd069a8aca9f6a0e0e8445eaac135014d0fe80d1a1abf51f9dfb0194c2c765803029df
6
+ metadata.gz: 4003bd190e9c68bb027feaf7166e350952384300c02f935cce3f430679eee5727bf739dffe56d4312cdda5758c7b319f7ffa871e3245c423cf74b19c5009efe9
7
+ data.tar.gz: d7065becfeda6309237f0708bdfcc9a55dad2a896c75deaf9797c5067be09d0cc5d44804b4f29ff4a9be8eec74b92927801342385e2a7b8ca86939cbf6578dd9
data/README.md CHANGED
@@ -16,13 +16,13 @@ If you use Rbenv to manage your Ruby versions, you may have to run:
16
16
 
17
17
  From your terminal, run the `rainbow` command followed by your data structure surrounded by quotation marks.
18
18
 
19
- For example, if you wanted to view the following hash from your terminal:
19
+ For example, if you wanted to view the following hash in your terminal:
20
20
 
21
- [TEST, {a: 1, [2, 3, 4]}]
21
+ ['TEST', {a: 1, [2, 3, 4, {cow: 'moo'}]}]
22
22
 
23
23
  you would run:
24
24
 
25
- rainbow "[TEST, {a: 1, [2, 3, 4, {cow: 'moo'}]}]"
25
+ $ rainbow "['TEST', {a: 1, [2, 3, 4, {cow: 'moo'}]}]"
26
26
 
27
27
  And watch the results!
28
28
 
data/bin/rainbow CHANGED
@@ -2,4 +2,8 @@
2
2
 
3
3
  require_relative "../lib/rainbow_hash"
4
4
 
5
- RainbowHash::Display.print(ARGV[0])
5
+ if ARGV[0]
6
+ RainbowHash::Display.print(ARGV[0])
7
+ else
8
+ puts "You must include a parameter, for example: rainbow \"['TEST', {a: 1, [2, 3, 4, {cow: 'moo'}]}]\""
9
+ end
@@ -3,7 +3,7 @@ module RainbowHash
3
3
  class Display
4
4
 
5
5
  def self.print(string)
6
- self.new(string).output
6
+ puts self.new(string).output
7
7
  end
8
8
 
9
9
  def initialize(string)
@@ -25,7 +25,7 @@ module RainbowHash
25
25
  new_string += "\n" + (" " * @indentation_level)
26
26
  end
27
27
  end
28
- puts new_string
28
+ new_string
29
29
  end
30
30
 
31
31
  private
@@ -1,3 +1,3 @@
1
1
  module RainbowHash
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: rainbow_hash
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
  - Jay Wengrow