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
Fixed bug associated with anonymous mapping lambdas.
dyoder (author)
Tue Jul 01 09:34:25 -0700 2008
commit  e5804c2e011b637f7ee60581f82643b4c964789f
tree    4651d7866db2c53ef247620e7faa67757eae8f80
parent  ebf0eb086bfef41b39fd8333b6dcad644f279170
...
12
13
14
 
15
16
17
...
19
20
21
22
23
 
24
25
26
...
12
13
14
15
16
17
18
...
20
21
22
 
 
23
24
25
26
0
@@ -12,6 +12,7 @@ module Waves
0
       def initialize( options )
0
         @name = name = options[:name] ; @pattern = pattern = Pattern.new( options )
0
         @constraints = Constraints.new( options ) ; @descriptors = Descriptors.new( options )
0
+ @block = options[:block]
0
         if rname = options[ :resource ]
0
           @resource = resource = Waves.application[:resources][ rname ]
0
         else
0
@@ -19,8 +20,7 @@ module Waves
0
           @resource = Waves::Resources::Proxy
0
         end
0
         if name
0
- block = options[:block]
0
- resource.instance_eval { define_method( name, &block ) } if block
0
+ resource.instance_eval { define_method( name, &@block ) } if @block
0
           resource::Paths.instance_eval { define_method( name ) { |*args| generate( options[ :path ], args ) } }
0
         end
0
       end

Comments

    No one has commented yet.