Bradley Schaefer
- 1y ·
-
Public·
-
ruby.social
@noelrap @r3trofitted Yeah, those are some options. I thought there was something nice about not having an extra "stuff" floating around ala
Delete = Class.new { include Singleton }
def self.delete = Delete.instance
Another funny one is
Delete = (Delete = Class.new).new
You get a constant redefining warning, but it works lol.
I try to avoid thinking about state by avoiding a lot of memoization, which is probably anti-ruby of me ha.