class Foo def self.do_it "bar" end class << self; extend ActiveSupport::Memoizable; self; end.memoize :do_it end