Skip to content

Instantly share code, notes, and snippets.

@sinsoku
Created October 18, 2022 02:35
Show Gist options
  • Save sinsoku/5c99605bb1bb30efc154dcc66194fba0 to your computer and use it in GitHub Desktop.
Save sinsoku/5c99605bb1bb30efc154dcc66194fba0 to your computer and use it in GitHub Desktop.
class A
@@foo = "foo"
class << self
@@bar = "bar"
end
end
p A.class_variable_get(:@@foo) #=> "foo"
p A.class_variable_get(:@@bar) #=> "bar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment