Skip to content

Instantly share code, notes, and snippets.

@csexton
Last active August 29, 2015 14:23
Show Gist options
  • Save csexton/b8c2220b08c3f3c9d694 to your computer and use it in GitHub Desktop.
Save csexton/b8c2220b08c3f3c9d694 to your computer and use it in GitHub Desktop.
class Parent
class Child < Parent
def self.cry
"(╥﹏╥)"
end
end
end
puts Parent::Child::Child::Child::Child::Child::Child::Child::Child.cry
% ruby parent.rb
(╥﹏╥)
@cupakromer
Copy link

I raise you:

class Relative
  def self.cry
    "(╥﹏╥)"
  end

  class Parent < Relative
    class Child < Parent
    end

    class Sibling < Child
    end
  end
end

puts Relative::Parent::Parent::Child::Child::Sibling::Child::Parent::Sibling.cry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment