hashr 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/hashr.rb +7 -0
- data/lib/hashr/version.rb +1 -1
- data/test/hashr_test.rb +8 -0
- metadata +6 -6
data/Gemfile.lock
CHANGED
data/lib/hashr.rb
CHANGED
data/lib/hashr/version.rb
CHANGED
data/test/hashr_test.rb
CHANGED
@@ -178,5 +178,13 @@ class HashrTest < Test::Unit::TestCase
|
|
178
178
|
end
|
179
179
|
assert_equal 5, hashr.count
|
180
180
|
end
|
181
|
+
|
182
|
+
test 'to_hash converts the Hashr instance and all of its children to Hashes' do
|
183
|
+
hash = Hashr.new(:foo => { :bar => { :baz => 'baz' } }).to_hash
|
184
|
+
|
185
|
+
assert hash.instance_of?(Hash)
|
186
|
+
assert hash[:foo].instance_of?(Hash)
|
187
|
+
assert hash[:foo][:bar].instance_of?(Hash)
|
188
|
+
end
|
181
189
|
end
|
182
190
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-09-
|
12
|
+
date: 2011-09-29 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70154104357900 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70154104357900
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: test_declarative
|
27
|
-
requirement: &
|
27
|
+
requirement: &70154104357400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 0.0.2
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70154104357400
|
36
36
|
description: Simple Hash extension to make working with nested hashes (e.g. for configuration)
|
37
37
|
easier and less error-prone.
|
38
38
|
email: svenfuchs@artweb-design.de
|