karottenreibe-ohash 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.markdown +5 -0
- data/README.markdown +8 -6
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/ohash.gemspec +4 -5
- metadata +4 -5
- data/Manifest.txt +0 -4
data/HISTORY.markdown
CHANGED
data/README.markdown
CHANGED
@@ -8,8 +8,7 @@ Description
|
|
8
8
|
|
9
9
|
OpenHash (short: ohash) is a simple, enhanced hash structure with the direct
|
10
10
|
member access of OpenStruct, but without all the restrictions.
|
11
|
-
It also features some niceties as found in Mash
|
12
|
-
(http://www.intridea.com/2008/4/12/mash-mocking-hash-for-total-poser-objects?blog=company).
|
11
|
+
It also features some niceties as found in [Mash][].
|
13
12
|
|
14
13
|
Synopsis
|
15
14
|
--------
|
@@ -20,24 +19,24 @@ Synopsis
|
|
20
19
|
o = OpenHash.new({:foo => 12})
|
21
20
|
o = OpenHash.new
|
22
21
|
|
23
|
-
|
22
|
+
# Access to hash methods
|
24
23
|
|
25
24
|
o._merge!({:foo => 12, :bar => 22})
|
26
25
|
o._keys #=> [:foo, :bar]
|
27
26
|
|
28
|
-
|
27
|
+
# Member access
|
29
28
|
|
30
29
|
o.foo == 12 #=> true
|
31
30
|
o.foo = 33
|
32
31
|
o[:foo] == 12 #=> false
|
33
32
|
|
34
|
-
|
33
|
+
# Membership test
|
35
34
|
|
36
35
|
o.foo? #=> true
|
37
36
|
o.bar? #=> true
|
38
37
|
o.bla? #=> false
|
39
38
|
|
40
|
-
|
39
|
+
# Quick population with sub hashes
|
41
40
|
|
42
41
|
o.bla!.goo = 23
|
43
42
|
o.bla!.yadda!.rofl = 42
|
@@ -77,3 +76,6 @@ License
|
|
77
76
|
|
78
77
|
----------------------------------------*/
|
79
78
|
|
79
|
+
[mash]: http://www.intridea.com/2008/4/12/mash-mocking-hash-for-total-poser-objects?blog=company
|
80
|
+
"The Mash project, similar to OpenHash"
|
81
|
+
|
data/Rakefile
CHANGED
@@ -10,9 +10,9 @@ Jeweler::Tasks.new do |gem|
|
|
10
10
|
gem.name = "ohash"
|
11
11
|
gem.summary = gem.description = "A simple, enhanced hash structure with the direct member access of OpenStruct, but without all the restrictions."
|
12
12
|
gem.email = "karottenreibe@gmail.com"
|
13
|
-
gem.homepage = "http://github.com/karottenreibe/
|
13
|
+
gem.homepage = "http://github.com/karottenreibe/ohash"
|
14
14
|
gem.authors = ["Fabian Streitel"]
|
15
|
-
gem.rubyforge_project = '
|
15
|
+
gem.rubyforge_project = 'k-gems'
|
16
16
|
end
|
17
17
|
|
18
18
|
Jeweler::RubyforgeTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/ohash.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ohash}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Fabian Streitel"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-09-07}
|
13
13
|
s.description = %q{A simple, enhanced hash structure with the direct member access of OpenStruct, but without all the restrictions.}
|
14
14
|
s.email = %q{karottenreibe@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.files = [
|
20
20
|
"HISTORY.markdown",
|
21
21
|
"LICENSE.txt",
|
22
|
-
"Manifest.txt",
|
23
22
|
"README.markdown",
|
24
23
|
"Rakefile",
|
25
24
|
"VERSION",
|
@@ -27,10 +26,10 @@ Gem::Specification.new do |s|
|
|
27
26
|
"ohash.gemspec",
|
28
27
|
"test/test_ohash.rb"
|
29
28
|
]
|
30
|
-
s.homepage = %q{http://github.com/karottenreibe/
|
29
|
+
s.homepage = %q{http://github.com/karottenreibe/ohash}
|
31
30
|
s.rdoc_options = ["--charset=UTF-8"]
|
32
31
|
s.require_paths = ["lib"]
|
33
|
-
s.rubyforge_project = %q{
|
32
|
+
s.rubyforge_project = %q{k-gems}
|
34
33
|
s.rubygems_version = %q{1.3.4}
|
35
34
|
s.summary = %q{A simple, enhanced hash structure with the direct member access of OpenStruct, but without all the restrictions.}
|
36
35
|
s.test_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karottenreibe-ohash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabian Streitel
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-07 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -25,7 +25,6 @@ extra_rdoc_files:
|
|
25
25
|
files:
|
26
26
|
- HISTORY.markdown
|
27
27
|
- LICENSE.txt
|
28
|
-
- Manifest.txt
|
29
28
|
- README.markdown
|
30
29
|
- Rakefile
|
31
30
|
- VERSION
|
@@ -33,7 +32,7 @@ files:
|
|
33
32
|
- ohash.gemspec
|
34
33
|
- test/test_ohash.rb
|
35
34
|
has_rdoc: false
|
36
|
-
homepage: http://github.com/karottenreibe/
|
35
|
+
homepage: http://github.com/karottenreibe/ohash
|
37
36
|
licenses:
|
38
37
|
post_install_message:
|
39
38
|
rdoc_options:
|
@@ -54,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
53
|
version:
|
55
54
|
requirements: []
|
56
55
|
|
57
|
-
rubyforge_project:
|
56
|
+
rubyforge_project: k-gems
|
58
57
|
rubygems_version: 1.3.5
|
59
58
|
signing_key:
|
60
59
|
specification_version: 3
|
data/Manifest.txt
DELETED