DEV Community

pooyaalamdari
pooyaalamdari

Posted on

self and scope and access method

obj.respond_to?("x")
Enter fullscreen mode Exit fullscreen mode

hey obj! Do you respond to x?

self is the 'current' or 'default' object.
self like the first person -> I

Latest comments (0)