Skip to content

Instantly share code, notes, and snippets.

@pjg pjg/gist:1385392

Created Nov 22, 2011
What would you like to do?
Metaprogramming fu

I have:

  @@host ||= something

now I want to convert it into this:

class << self
  defined_method "host" do
    class_variable_set ????

how do I "convert" ||= to class_variable_set ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.