@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.

0
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Replies