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
consistent arg name in included()
automatthew (author)
Tue Sep 02 10:14:21 -0700 2008
commit  49cf6d6e8fd3dc67a0186254f16c6e476fef6fea
tree    cc370d7833335ad51f96f83b0aeac8094bd8474a
parent  16d444752cc8fcf83692ba938baa1d3a4e5739b7
...
96
97
98
99
100
 
 
101
102
103
...
96
97
98
 
 
99
100
101
102
103
0
@@ -96,8 +96,8 @@ module Waves
0
       # controller with the request, then evaluates the block using +instance_eval+. This allows the
0
       # controller to be used from within a mapping lambda (i.e. a ResponseProxy).
0
 
0
- def self.included( mod )
0
- def mod.process( request, &block )
0
+ def self.included( target )
0
+ def target.process( request, &block )
0
           self.new( request ).instance_eval( &block )
0
         end
0
       end
...
16
17
18
19
 
20
21
22
 
23
24
 
25
26
27
28
29
 
30
31
32
33
 
34
35
36
 
37
38
39
40
 
41
42
43
...
16
17
18
 
19
20
21
 
22
23
 
24
25
26
27
28
 
29
30
31
32
 
33
34
35
 
36
37
38
39
 
40
41
42
43
0
@@ -16,28 +16,28 @@ module Waves
0
       # - template: read the template from the file corresponding to the given logical path.
0
       # - helper: return a helper module that corresponds to the given logical path.
0
       #
0
- def self.included(mod)
0
+ def self.included( target )
0
         
0
         # Register the renderer with the Views module
0
- Views.renderers << mod
0
+ Views.renderers << target
0
 
0
- def mod.extension(*args)
0
+ def target.extension(*args)
0
           return @extension if args.length == 0
0
           @extension = args.first
0
         end
0
 
0
- def mod.filename(path)
0
+ def target.filename(path)
0
           :templates / "#{path}.#{self.extension}"
0
         end
0
 
0
- def mod.render(path,args=nil)
0
+ def target.render(path,args=nil)
0
         end
0
 
0
- def mod.template( path )
0
+ def target.template( path )
0
           File.read( filename( path ) )
0
         end
0
 
0
- def mod.helper( path )
0
+ def target.helper( path )
0
           Waves.main[ :helpers ][ File.basename( File.dirname( path ) ).camel_case ]
0
         end
0
       end
...
82
83
84
85
86
 
 
87
88
89
...
82
83
84
 
 
85
86
87
88
89
0
@@ -82,8 +82,8 @@ module Waves
0
 
0
       include Waves::ResponseMixin
0
 
0
- def self.included( c )
0
- def c.process( request, *args, &block )
0
+ def self.included( target )
0
+ def target.process( request, *args, &block )
0
           self.new( request ).instance_exec( *args, &block )
0
         end
0
       end

Comments

    No one has commented yet.