Created
April 30, 2015 17:41
-
-
Save flash-gordon/491bc57f1749dd3bb4af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TestCV | |
def value=(val) | |
@@value = val | |
end | |
def value | |
@@value | |
end | |
end | |
class Foo | |
extend TestCV | |
self.value = :foo | |
end | |
puts 'Foo.value: %s' % Foo.value | |
class Bar | |
extend TestCV | |
self.value = :bar | |
end | |
puts 'Bar.value: %s' % Bar.value | |
puts 'Foo.value: %s' % Foo.value | |
# Foo.value: foo | |
# Bar.value: bar | |
# Foo.value: bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment