hash_with_key_access_method 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b5d97ad590b62ef45924d050d3b16e880a463c6
|
4
|
+
data.tar.gz: 654f55ab1687d982ee7d9b0bb4900e49913af02c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6d207dd2fab89f7d7a9391f159a9ff5b085ad51c395b59bf97739dcf04eaf2dbb35b75b62b8c541ac9c6dbb387676c4e317394732cdd21e8887e73cfd163cbf
|
7
|
+
data.tar.gz: 28bed2c5f08db9b64504e6c0f37543c43f5414a4c5a3b757a0a2fcae1ac73fc70d0a5e0fba6b0a6b3c3717198b187d28301fea711b149e5af051a1761a2cc59b
|
data/README.md
CHANGED
@@ -19,6 +19,9 @@ Or install it yourself as:
|
|
19
19
|
## Usage
|
20
20
|
|
21
21
|
```ruby
|
22
|
+
# Using refinements
|
23
|
+
using HashWithKeyAccessMethod
|
24
|
+
|
22
25
|
hash = { name: :homu, "name2" => :mami}
|
23
26
|
|
24
27
|
hash.name # to hash[:name]
|
@@ -38,6 +41,14 @@ hash.age
|
|
38
41
|
# => 13
|
39
42
|
hash[:age]
|
40
43
|
# => 13
|
44
|
+
|
45
|
+
|
46
|
+
# Use included Hash.
|
47
|
+
require "hash_with_key_access_method/included"
|
48
|
+
|
49
|
+
hashs = [{name: :homu}, {name: :mami}, {name: :mado}]
|
50
|
+
hashs.map &:name
|
51
|
+
# => [:homu, :mami, :mado]
|
41
52
|
```
|
42
53
|
|
43
54
|
## Contributing
|
@@ -0,0 +1 @@
|
|
1
|
+
require "hash_with_key_access_method/included/hash"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hash_with_key_access_method
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- manga_osyo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -68,6 +68,8 @@ files:
|
|
68
68
|
- Rakefile
|
69
69
|
- hash_with_key_access_method.gemspec
|
70
70
|
- lib/hash_with_key_access_method.rb
|
71
|
+
- lib/hash_with_key_access_method/included.rb
|
72
|
+
- lib/hash_with_key_access_method/included/hash.rb
|
71
73
|
- lib/hash_with_key_access_method/version.rb
|
72
74
|
- spec/hash_with_key_access_method_spec.rb
|
73
75
|
- spec/spec_helper.rb
|