public
Description: Piston is a utility that eases vendor branch management. This repository is a complete reimplementation of Piston to provide different backends, depending on the repositories and working copies you pistonize from.
Homepage: http://piston.rubyforge.org/
Clone URL: git://github.com/francois/piston.git
Search Repo:
Removing #turn_methods_public and #turn_all_methods_public.

Piston::Repository has no private/protected methods, and even if it did, 
#send will do the trick nicely.
francois (author)
Fri May 09 07:29:15 -0700 2008
commit  1f33caa0eb2ab49783bcba64423255085f3b4c34
tree    9bc272942e09f381ad60fb00d6e76734e3ab7d97
parent  e7137083c47bc470982ebdff2db4801fb2fae755
...
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
...
48
49
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -48,23 +48,4 @@
0
 Log4r::Logger["main"].add "log"
0
 Log4r::Logger["handler"].add "log"
0
 Log4r::Logger["test"].add "log"
0
-
0
-def turn_methods_public(classe, method_name = nil)
0
- if method_name
0
- classe.class_eval do
0
- public method_name
0
- end
0
- else
0
- turn_all_methods_public classe
0
- end
0
-end
0
-
0
-def turn_all_methods_public(classe)
0
- classe.class_eval do
0
- private_instance_methods.each { |instance_method| public instance_method }
0
- private_methods.each { |method| public_class_method method }
0
- protected_instance_methods.each { |instance_method| public instance_method }
0
- protected_methods.each { |method| public_class_method method }
0
- end
0
-end
...
3
4
5
6
7
8
9
...
3
4
5
 
6
7
8
0
@@ -3,7 +3,6 @@
0
 class TestRepository < Test::Unit::TestCase
0
   
0
   def setup
0
- turn_all_methods_public(Piston::Repository)
0
     Piston::Repository.class_variable_set(:@@handlers, [Piston::Git::Repository, Piston::Svn::Repository])
0
     @repository = Piston::Repository.new("url")
0
   end

Comments

    No one has commented yet.