Skip to content

Instantly share code, notes, and snippets.

@xcobar

xcobar/parent.rb Secret

Last active September 21, 2019 15:34
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 xcobar/d9a19ee8ad693bf7f2c9384e12b4025b to your computer and use it in GitHub Desktop.
Save xcobar/d9a19ee8ad693bf7f2c9384e12b4025b to your computer and use it in GitHub Desktop.
module A
module B
module C
class D
def self.shout
"HEY!"
end
end
end
end
end
m = A::B::C::D
# How do I output A, parent of B, through variable "m"?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment