removed some unnecessary helper methods

This commit is contained in:
John Mair 2011-05-30 03:44:50 +12:00
parent 887251b247
commit 9861b68b9d
2 changed files with 3 additions and 10 deletions

View File

@ -14,10 +14,6 @@ class Pry
end end
end end
def remove_first_word(text)
text.split.drop(1).join(' ')
end
def find_command(name) def find_command(name)
command_match = commands.find { |_, command| command.options[:listing] == name } command_match = commands.find { |_, command| command.options[:listing] == name }
@ -49,8 +45,10 @@ class Pry
gems_needed = Array(options[:requires_gem]) gems_needed = Array(options[:requires_gem])
gems_not_installed = gems_needed.select { |g| !gem_installed?(g) } gems_not_installed = gems_needed.select { |g| !gem_installed?(g) }
proc do proc do
output.puts "\n#{name} requires the following gems to be installed: #{(gems_needed.join(", "))}" output.puts "\nThe command '#{name}' requires the following gems to be installed: #{(gems_needed.join(", "))}"
output.puts "-"
output.puts "Command not available due to dependency on gems: `#{gems_not_installed.join(", ")}` not being met." output.puts "Command not available due to dependency on gems: `#{gems_not_installed.join(", ")}` not being met."
output.puts "-"
output.puts "Type `install #{name}` to install the required gems and activate this command." output.puts "Type `install #{name}` to install the required gems and activate this command."
end end
end end

View File

@ -48,11 +48,6 @@ class Pry
end end
end end
def remove_first_word(text)
text.split.drop(1).join(' ')
end
def code_and_code_type_for(meth) def code_and_code_type_for(meth)
case code_type = code_type_for(meth) case code_type = code_type_for(meth)
when nil when nil