class Foo
def self.bar
puts "foobar"
end
def bar
self.class.bar
end
end
I want to refrain from needing to define the instance method bar. Is there a way to automatically make class methods accessible as instance methods? Maybe with some method_missing? magic?
Try something like:
You can also do this (simple version):