Skip to content

Commit

Permalink
Add source_for to irbrc to track down method locations in source files
Browse files Browse the repository at this point in the history
  • Loading branch information
tommeier committed Mar 5, 2013
1 parent 4007dee commit 634ff68
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions irbrc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ def paste
`pbpaste`
end

def source_for(object, method)
location = object.method(method).source_location
`subl #{location[0]}:#{location[1]}` if location
location
end

#Colour Setup
ANSI_SETUP = {}
ANSI_SETUP[:RESET] = "\e[0m"
Expand Down

0 comments on commit 634ff68

Please sign in to comment.