Skip to content

Instantly share code, notes, and snippets.

@ShadowBelmolve
Created October 12, 2012 02:30
Show Gist options
  • Save ShadowBelmolve/3877001 to your computer and use it in GitHub Desktop.
Save ShadowBelmolve/3877001 to your computer and use it in GitHub Desktop.
Inspect source of files
SCRIPT_LINES__ = {}
require './test'
puts SCRIPT_LINES__.keys
# [".../test.rb"]
puts SCRIPT_LINES__.first[1].join
# def foo
# puts "bar"
# end
def foo
puts "bar"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment