Skip to content

Instantly share code, notes, and snippets.

@Houdini
Created Apr 18, 2014
Embed
What would you like to do?
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