Created
June 6, 2012 16:49
-
-
Save 58bits/2883222 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
class Fun | |
@@a = 1 | |
@b = 1 | |
class << self | |
attr_accessor :hides | |
end | |
attr_accessor :shows | |
def show_a | |
puts @@a | |
end | |
def self.show_a | |
puts @@a | |
end | |
def show_b | |
puts @b | |
end | |
def self.show_b | |
puts @b | |
end | |
def show_c | |
@c = 2 | |
puts @c | |
end | |
def self.show_d | |
@d = 10 | |
puts @d | |
end | |
def self.show_e | |
@@e = 100 | |
puts @@e | |
end | |
end | |
class Fly < Fun | |
def self.show_a | |
puts @@a | |
end | |
def self.show_b | |
puts @b | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment