I am trying to understand the _why cloaker method that he wrote about in the block costume :
class HTML def cloaker &blk (class << self; self; end).class_eval do
I understand that class << self; self; end class << self; self; end class << self; self; end opens Eigenclass self , but I have never seen anyone do this inside an instance method before. What is self at the point where we do it? I was impressed with self to be the receiver that called the method, but cloaker is called from inside method_missing :
def method_missing tag, text = nil, &blk
So what is self inside method_missing call? And what is self when we call:
((class << self; self; end).class_eval)
inside the cloaker method?
Basically, I want to know if we open the Eignenclass of the HTML class or do it in a specific instance of the HTML class?
stephenmurdoch
source share