Skip to content

Commit

Permalink
add edit-method stub: deprecation warning, use edit
Browse files Browse the repository at this point in the history
  • Loading branch information
banister committed Jan 12, 2013
1 parent d3d29c4 commit f94eb5a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/pry/commands/edit_method.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class Pry
class Command::EditMethod < Pry::ClassCommand
match 'edit-method'
group 'Editing'
description 'Show the source for CMD.'

banner <<-'BANNER'
Show the source for CMD.
BANNER

def process(*args)
target = target()

opts = Slop.parse!(args) do |opt|
opt.banner unindent <<-'BANNER'
NOTE: edit-method is DEPRECATED. Use `edit` instead.
BANNER

opt.on :h, :help, "This message" do
output.puts opt.help
end
end

stagger_output opts.banner
end
end

Pry::Commands.add_command(Pry::Command::EditMethod)
end

0 comments on commit f94eb5a

Please sign in to comment.