ohash 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/LICENSE.txt +22 -0
- data/README.txt +54 -0
- data/lib/ohash.rb +20 -0
- data.tar.gz.sig +0 -0
- metadata +94 -0
- metadata.gz.sig +0 -0
data/History.txt
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
/*---- DON'T PANIC License 1.1 -----------
|
2
|
+
|
3
|
+
Don't panic, this piece of software is
|
4
|
+
free, i.e. you can do with it whatever
|
5
|
+
you like, including, but not limited to:
|
6
|
+
|
7
|
+
* using it
|
8
|
+
* copying it
|
9
|
+
* (re)distributing it
|
10
|
+
* burning/burying/shredding it
|
11
|
+
* eating it
|
12
|
+
* using it to obtain world domination
|
13
|
+
* and ignoring it
|
14
|
+
|
15
|
+
Under the sole condition that you
|
16
|
+
|
17
|
+
* CONSIDER buying the author a strong
|
18
|
+
brownian motion producer, say a nice
|
19
|
+
hot cup of tea, should you ever meet
|
20
|
+
him in person.
|
21
|
+
|
22
|
+
----------------------------------------*/
|
data/README.txt
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
= ohash
|
2
|
+
|
3
|
+
* http://github.com/karottenreibe/ohash
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
OpenHash (short: ohash) is a simple, enhanced hash structure with the direct
|
8
|
+
member access of OpenStruct, but without all the restrictions.
|
9
|
+
|
10
|
+
== SYNOPSIS:
|
11
|
+
|
12
|
+
require 'rubygems'
|
13
|
+
require 'ohash'
|
14
|
+
|
15
|
+
o = OpenHash.new({:foo => 12})
|
16
|
+
o.foo #=> 12
|
17
|
+
|
18
|
+
o[:foo] #=> 12
|
19
|
+
|
20
|
+
o.bar = 42
|
21
|
+
o.bar #=> 42
|
22
|
+
|
23
|
+
o.merge!({:goo => 23})
|
24
|
+
o.goo #=> 23
|
25
|
+
|
26
|
+
== INSTALL:
|
27
|
+
|
28
|
+
* sudo gem install karottenreibe-ohash --source http://gems.github.com
|
29
|
+
|
30
|
+
== LICENSE:
|
31
|
+
|
32
|
+
/*---- DON'T PANIC License 1.1 -----------
|
33
|
+
|
34
|
+
Don't panic, this piece of software is
|
35
|
+
free, i.e. you can do with it whatever
|
36
|
+
you like, including, but not limited to:
|
37
|
+
|
38
|
+
* using it
|
39
|
+
* copying it
|
40
|
+
* (re)distributing it
|
41
|
+
* burning/burying/shredding it
|
42
|
+
* eating it
|
43
|
+
* using it to obtain world domination
|
44
|
+
* and ignoring it
|
45
|
+
|
46
|
+
Under the sole condition that you
|
47
|
+
|
48
|
+
* CONSIDER buying the author a strong
|
49
|
+
brownian motion producer, say a nice
|
50
|
+
hot cup of tea, should you ever meet
|
51
|
+
him in person.
|
52
|
+
|
53
|
+
----------------------------------------*/
|
54
|
+
|
data/lib/ohash.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Since I personally hate OpenStructs, this is a
|
4
|
+
# Hash with the same features, but it's mergeable etc...
|
5
|
+
#
|
6
|
+
class Sif::OpenHash < Hash
|
7
|
+
|
8
|
+
def method_missing meth, *args
|
9
|
+
method = meth.to_s
|
10
|
+
|
11
|
+
if method =~ %r{.+=$}
|
12
|
+
super unless args.length == 1
|
13
|
+
self[method[0...-1].to_sym] = args.first
|
14
|
+
else
|
15
|
+
self[meth]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ohash
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Fabian Streitel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDPDCCAiSgAwIBAgIBAD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Kbm1uxF7e
|
28
|
+
ea+/ZXhbYi/6ZCifLOdERB9R6d4c6CjvncB5O3PsNBEJJyZlId+5Cjoa5zIr5ZRV
|
29
|
+
skRklVhmwIBdRWmDs55zR67GyUpB5zcaCmI6bJJdYznJfhB7H2MRjNa5fR37/R81
|
30
|
+
VTOC4p362V8lN9C3G+M8FA==
|
31
|
+
-----END CERTIFICATE-----
|
32
|
+
|
33
|
+
date: 2009-07-31 00:00:00 +02:00
|
34
|
+
default_executable:
|
35
|
+
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: hoe
|
38
|
+
type: :development
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 2.3.2
|
45
|
+
version:
|
46
|
+
description: |-
|
47
|
+
OpenHash (short: ohash) is a simple, enhanced hash structure with the direct
|
48
|
+
member access of OpenStruct, but without all the restrictions.
|
49
|
+
email:
|
50
|
+
- karottenreibe@gmail.com
|
51
|
+
executables: []
|
52
|
+
|
53
|
+
extensions: []
|
54
|
+
|
55
|
+
extra_rdoc_files:
|
56
|
+
- History.txt
|
57
|
+
- LICENSE.txt
|
58
|
+
- README.txt
|
59
|
+
files:
|
60
|
+
- History.txt
|
61
|
+
- LICENSE.txt
|
62
|
+
- README.txt
|
63
|
+
- lib/ohash.rb
|
64
|
+
has_rdoc: true
|
65
|
+
homepage: http://github.com/karottenreibe/ohash
|
66
|
+
licenses: []
|
67
|
+
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options:
|
70
|
+
- --main
|
71
|
+
- README.txt
|
72
|
+
require_paths:
|
73
|
+
- lib
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
version:
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: "0"
|
85
|
+
version:
|
86
|
+
requirements: []
|
87
|
+
|
88
|
+
rubyforge_project: ohash
|
89
|
+
rubygems_version: 1.3.4
|
90
|
+
signing_key:
|
91
|
+
specification_version: 3
|
92
|
+
summary: "OpenHash (short: ohash) is a simple, enhanced hash structure with the direct member access of OpenStruct, but without all the restrictions."
|
93
|
+
test_files: []
|
94
|
+
|
metadata.gz.sig
ADDED
Binary file
|