Skip to content

Instantly share code, notes, and snippets.

@jayrobin
Last active October 11, 2016 18:46
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 jayrobin/5f6c40ca687388b912caa9656ad055f0 to your computer and use it in GitHub Desktop.
Save jayrobin/5f6c40ca687388b912caa9656ad055f0 to your computer and use it in GitHub Desktop.
module FormatHelper
def self.included(base)
puts base # prints the scope where it's included
puts caller # prints call stack, which will point to the file that's including it
end
def phone_number
# return phone number
end
end
# Result:
#
# Object
# ["../mock/blueprints.rb:1:in `include'", ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment