search for: hook_b

Displaying 2 results from an estimated 2 matches for "hook_b".

Did you mean: hook_
2006 Nov 04
0
traits-0.9.2 - better living through metaprogramming
...''traits'' # # pre and post hooks can be passed a proc or the name of a method, the arity is # detected and the proc/method sent either the value, or the name/value pair # class C HOOK_A = lambda{|value| puts "HOOK_A : #{ value }"} HOOK_B = lambda{|name, value| puts "HOOK_B : #{ name } = #{ value }"} def hook_a value puts "hook_a : #{ value }" end def hook_b name, value puts "hook_b : #{ name } = #{ value }" end trait ''x'', '...
2006 Nov 04
0
traits-0.10.0
...e ''traits'' # # pre and post hooks can be passed a proc or the name of a method, the arity is # detected and the proc/method sent either the value, or the name/value pair # class C HOOK_A = lambda{|value| puts "HOOK_A : #{ value }"} HOOK_B = lambda{|name, value| puts "HOOK_B : #{ name } = #{ value }"} def hook_a value puts "hook_a : #{ value }" end def hook_b name, value puts "hook_b : #{ name } = #{ value }" end trait ''x'', '...