dodiez 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -3
  3. data/lib/dodiez/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad1b7dd619ea18a7bde536ea442c0003ab4b7a0e
4
- data.tar.gz: 38cb18aa55afe6b65b3925929787b5c67660667a
3
+ metadata.gz: 322dd8f8db4a0b5950a9d84dd5680d6badaf1699
4
+ data.tar.gz: e26ea73643b43dacf3b1c1e0d629f0c2559611e4
5
5
  SHA512:
6
- metadata.gz: 1a712e521122a53e344f9eba15286b260bc01255ec5cfd292b27db8f0fe33394b77a7600f9293fc7f204af1a7b87807f24d9ddbddd972a8f52fe637ebaf1cad9
7
- data.tar.gz: 8b80aa5f1463e6e5b37c742380e19cc30acbe955621655815d74aad507d6a039f86552a5f9a145b1058248ad018ec76f53e829e7237b9772b824e24cfb041246
6
+ metadata.gz: ef665f0ad81b01851fbda4a64ac62f33dac0cbdfbf2845e9c05d894156549cfd10810b0b8a03b56afed5e7260326401f44a1445a569245471d5148f325c10710
7
+ data.tar.gz: df6cafa54a7cc12295f95b7a2e32ba06f863b22bfe2b26129920104a3fa000143538e137466d2ab10359bb7c6521df55875878e2bb1b1ea49468dc0ee7f26fae
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Dodiez
2
2
 
3
- 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/dodiez`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ This gem does the simple thing like "HashWithIndifferentAccess":
4
+ Implements a hash where keys :foo and "foo" are considered to be the same.
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
6
 
7
7
  ## Installation
8
8
 
@@ -22,7 +22,32 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ To use it you have to modify your hash:
26
+
27
+ ```ruby
28
+ your_hash = { qwe: 1, "qaz" => 2 }
29
+ your_modified_hash = CoolHash.new(your_hash)
30
+ ```
31
+
32
+ After it you can access keys as symbol or string:
33
+ ```ruby
34
+ your_modified_hash[:qwe] # 1
35
+ your_modified_hash["qwe"] # 1
36
+
37
+ your_modified_hash[:qaz] # 2
38
+ your_modified_hash["qaz"] # 2
39
+ ```
40
+
41
+ If your hash has the same Symbol and String keys, it returns their values properly.
42
+
43
+ ```ruby
44
+ your_hash = { qwe: 1, "qwe" => 2 }
45
+ your_modified_hash = CoolHash.new(your_hash)
46
+
47
+ your_modified_hash[:qwe] # 1
48
+ your_modified_hash["qwe"] # 2
49
+
50
+ ```
26
51
 
27
52
  ## Development
28
53
 
@@ -1,3 +1,3 @@
1
1
  module Dodiez
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dodiez
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
  - superedriver
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-13 00:00:00.000000000 Z
11
+ date: 2016-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler