ruby send vs __send__
- by jaydel
I understand the concept of some_instance.send but I'm trying to figure out why you can call this both ways? The Ruby Koans imply that there is some reason beyond providing lots of different ways to do the same thing and I'm wrestling with figuring this out. Here are the two examples of usage more concretely
class Foo
def bar?
true
end
end
foo = Foo.new
foo.send(:bar?)
foo.send(:bar?)
Anyone have any idea about this?
thanks in advance!