Ruby’s self keyword is one of those things that makes no sense until it does. Even experienced Rubyists sometimes forget its more obscure uses. Here are a few examples: To access instance methods from a mixin: self.name To create class methods: def self.my_method To access the metaclass: class << self They look arbitrary, like facts to be memorized. But there is an underlying structure. When you u
![RubyLetter - An Easier Way to Think About `self`](https://cdn-ak-scissors.b.st-hatena.com/image/square/8f8e7e874ebe319072161c197fa70cbb63811f17/height=288;version=1;width=512/http%3A%2F%2Fwww.rubyletter.com%2Fimages%2Flogo_mark.png)