GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: Resource-oriented open source Ruby framework for Web apps.
Homepage: http://rubywaves.com/
Clone URL: git://github.com/dyoder/waves.git
Enabled multiple application support.
dyoder (author)
Tue Jul 22 17:56:06 -0700 2008
commit  01c32d451ea1b2057c5c3a90d90c2aa4790f2056
tree    1e77fe8f752bc19e4d77442b8c7224433eeda5c1
parent  471bd18f8afc6bbe7616bbb0ff30375ceb3e1e8c
...
1
2
3
 
 
 
 
 
 
 
4
5
6
7
 
 
 
8
 
 
 
 
9
10
11
 
12
13
14
...
1
2
 
3
4
5
6
7
8
9
10
11
12
 
13
14
15
16
17
18
19
20
21
22
 
23
24
25
26
0
@@ -1,14 +1,26 @@
0
 # See the README for an overview.
0
 module Waves
0
-
0
+
0
+ class Applications << Array
0
+ def []( name )
0
+ self.find { |app| app.name == name.to_s }
0
+ end
0
+ end
0
+
0
   class << self
0
 
0
     # Access the principal Waves application.
0
- attr_reader :application
0
+ def applications
0
+ @applications ||= Applications.new
0
+ end
0
 
0
+ def application
0
+ applications.first
0
+ end
0
+
0
     # Register a module as a Waves application.
0
     def << ( app )
0
- @application = app if Module === app
0
+ applications << app if Module === app
0
     end
0
 
0
     def instance ; Waves::Application.instance ; end

Comments