Displaying 1 result from an estimated 1 matches for "initialize_without_extension".
2008 Nov 23
4
Strange behavior of alias_method_chains
...ructor"
self.name = a
self.value = b
end
def a
puts self.name
end
def b
puts self.value
end
end
</code>
, and an extended class XYZ in app/views/xyz_ext.rb
<code>
class XYZ
def initialize_with_extension a,b
puts "before chain"
initialize_without_extension a,b
puts "after chain"
end
alias_method_chain :initialize, :extension
end
</code>
So basically what I expect to have three lines in the console when
creating XYZ:
1) before chain
2) in Alias constructor
3) after chain
BUT I get something really different!
silencio:ali...