hash_dot 2.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/hash.rb +1 -2
- data/lib/hash_dot/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 448ec5a8658964de35063d5e4f34e7861af5a54d
|
4
|
+
data.tar.gz: a8152f865eff089a49741467ac14735277f96c00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7e57678d5d330b4948c731d500aa0ac91437836fe6f4e94c82e07401804cb41431099e4029946743a4bdc32ea54c55b51c0d3d4125d500e567680fa1176b08a
|
7
|
+
data.tar.gz: b7975158555229cf1a00525c2ff15c2c6dad1eea7ffc4c8113e9812c5dc1d086a787e5d0a70e0a0ceaabce3a4fd612130231cc10c01156d7dca36ff09b482ce4
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# HashDot
|
2
2
|
|
3
|
-
HashDot allows you to
|
3
|
+
HashDot allows you to get and set your Ruby hash properties with a dot syntax.
|
4
4
|
|
5
5
|
```ruby
|
6
6
|
require 'hash_dot'
|
@@ -12,6 +12,11 @@ HashDot allows you to call your Ruby hash properties with a dot syntax.
|
|
12
12
|
user.job.title #=> 'Senior Programmer'
|
13
13
|
user.job.delete(:title)
|
14
14
|
user.job.title #=> NoMethodError
|
15
|
+
user.job.title = 'Engineer'
|
16
|
+
user.job.title #=> 'Engineer'
|
17
|
+
user.job.department = 'DevOps'
|
18
|
+
user.job.department #=> 'DevOps'
|
19
|
+
user #=> {:name=>'Anna', :job=>{:title=>'Engineer', :department=>'DevOps'}}
|
15
20
|
```
|
16
21
|
|
17
22
|
You can also allow dot syntax for all hashes via the class setting.
|
data/lib/hash.rb
CHANGED
data/lib/hash_dot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hash_dot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Steel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.6.8
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Use dot syntax with Ruby hashes.
|