what is the idea behind creating a new instance of the method inside class << self construct? I understand methods are put under class << self block to make it class methods but what it means to creating a new instance of the method itself?
class foo
class << self
def bar(param)
new.bar(some_param)
end
end
end
Aucun commentaire:
Enregistrer un commentaire