public
Rubygem
Description: A lightweight and flexible website management system.
Homepage: http://webby.rubyforge.org/
Clone URL: git://github.com/TwP/webby.git
Providing full access to a resource's meta-data using good ol' hash 
reference
semantics. Enjoy!

(I can't figure out if the chickens are really smart or really stupid.
I usually lean towards the latter, but then they outsmart the two year 
old.)
TwP (author)
Wed Jun 11 11:37:28 -0700 2008
commit  275adf3494b455b21c34c65ab305987960ebe5bd
tree    05073dba5f23b7254008ef767856eb34e2c7d94a
parent  62c811c20edb0cbe00fbc3e45f2dca502333a72a
...
72
73
74
75
 
76
77
78
 
 
 
 
 
 
 
 
 
 
 
79
80
81
...
72
73
74
 
75
76
77
 
78
79
80
81
82
83
84
85
86
87
88
89
90
91
0
@@ -72,10 +72,20 @@ class Resource
0
   # resource[key] => value or nil
0
   #
0
   # Returns the value associated with the given meta-data key. Key is
0
- # usually a string.
0
+ # converted into a string.
0
   #
0
   def []( key )
0
- @mdata[key]
0
+ @mdata[key.to_s]
0
+ end
0
+
0
+ # call-seq:
0
+ # resource[key] = value
0
+ #
0
+ # Sets the given meta-data key to the value. Key is converted into a
0
+ # string.
0
+ #
0
+ def []=( key, value )
0
+ @mdata[key.to_s] = value
0
   end
0
 
0
   # call-seq:

Comments

    No one has commented yet.