Skip to content

Instantly share code, notes, and snippets.

@Houdini
Created April 18, 2014 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Houdini/11039641 to your computer and use it in GitHub Desktop.
Save Houdini/11039641 to your computer and use it in GitHub Desktop.
class A
@@dir_name = nil
def self.dir_name
@@dir_name
end
end
class B < A
@@dir_name = "B"
end
class C < A
@@dir_name = "C"
end
puts C.dir_name
puts B.dir_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment