Skip to content

Instantly share code, notes, and snippets.

@58bits
Created June 6, 2012 16:49
Show Gist options
  • Save 58bits/2883222 to your computer and use it in GitHub Desktop.
Save 58bits/2883222 to your computer and use it in GitHub Desktop.
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