i'm really confused how to name method names in Ruby classes. if i create an accessor like: attr_accessor :name
it creates to methods: name and name=
but when i call the second method with a whitespace between the 'name' and '=' it works
'n.name=' and 'n.name =' both works.
i read somewhere that Ruby ignores whitespaces. Well then, why a method written by me does not work when i call it with whitespace?
def getname end
if i call this way, it doesn't work. why? t.get name
i'm not surprised as it does not work. but i'm confused how the setter method (name=) works then?
thanks in advance.