Skip to content

Instantly share code, notes, and snippets.

@sevperez
Created March 1, 2018 08:59
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 sevperez/1269e24621e3c1a649b94dd46707522f to your computer and use it in GitHub Desktop.
Save sevperez/1269e24621e3c1a649b94dd46707522f to your computer and use it in GitHub Desktop.
class MyClass
def instance_inspect_self
p self
end
def self.class_inspect_self
p self
end
def self.announce_and_inspect_self
puts "Reporting for inspection!"
class_inspect_self
end
end
MyClass.announce_and_inspect_self
# Reporting for inspection!
# MyClass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment