public
Description: StrokeDB is an embeddable distributed document database written in Ruby
Homepage: http://strokedb.com/
Clone URL: git://github.com/yrashk/strokedb.git
added class Views as a wrapper for View[name]
oleganza (author)
Sun Apr 27 16:13:29 -0700 2008
commit  21fbb13d2b7dc9a123f2bd83b90dcf2a38f2308e
tree    d2ad25a3240d7a69dce624f2fe56121dc0b53955
parent  15f8e4aa0724aa2df2a48f7d9d6ab43e6140e8cd
...
216
217
218
 
 
 
 
 
 
 
 
219
220
221
...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
0
@@ -216,6 +216,14 @@ module StrokeDB
0
     end
0
   end
0
   
0
+  # Note: we don't simply do Views = View to avoid "Views" in a meta name.
0
+  # This class is for Views["name"] only.
0
+  class Views
0
+    def self.[](view_name)
0
+      View[view_name]
0
+    end
0
+  end
0
+  
0
   class << View
0
     def [](name)
0
       # TODO: find viewdoc by name

Comments