D
Daniel Schierbeck
Just a little curiosity: If method definitions (`def foo; end') were to
return a symbol representing the method's name (`:foo' in this case)
rather than just nil, would this be possible?
class Klass
private def foo
"Klass#foo"
end
def bar
"Klass#bar"
end
end
obj = Klass.new
obj.bar -> "Klass#bar"
obj.foo -> private method `foo' called...
Cheers,
Daniel
return a symbol representing the method's name (`:foo' in this case)
rather than just nil, would this be possible?
class Klass
private def foo
"Klass#foo"
end
def bar
"Klass#bar"
end
end
obj = Klass.new
obj.bar -> "Klass#bar"
obj.foo -> private method `foo' called...
Cheers,
Daniel