Skip to content

Instantly share code, notes, and snippets.

@michaelfairley
Created January 22, 2013 00:18
Show Gist options
  • Save michaelfairley/4590848 to your computer and use it in GitHub Desktop.
Save michaelfairley/4590848 to your computer and use it in GitHub Desktop.
class A
def self.set
@x = "hello"
end
def self.get
@x || "byebye"
end
end
class B < A
end
A.set
puts A.get
# hello
puts B.get
# byebye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment