diff --git a/lib/pry/command_set.rb b/lib/pry/command_set.rb index d60f6e07..fcdc509d 100644 --- a/lib/pry/command_set.rb +++ b/lib/pry/command_set.rb @@ -312,7 +312,7 @@ class Pry alias_method :to_h, :to_hash # Find a command that matches the given line - # @param [String] val The line that might be a command invocation + # @param [String] pattern The line that might be a command invocation # @return [Pry::Command, nil] def [](pattern) @commands.values.select do |command| diff --git a/lib/pry/commands/find_method.rb b/lib/pry/commands/find_method.rb index da9c85d3..52974854 100644 --- a/lib/pry/commands/find_method.rb +++ b/lib/pry/commands/find_method.rb @@ -76,7 +76,7 @@ class Pry # pretty-print a list of matching methods. # - # @param Array[Method] + # @param [Array] matches def print_matches(matches) grouped = matches.group_by(&:owner) order = grouped.keys.sort_by{ |x| x.name || x.to_s } @@ -111,9 +111,9 @@ class Pry # Run the given block against every constant in the provided namespace. # - # @param Module The namespace in which to start the search. - # @param Hash[Module,Boolean] The namespaces we've already visited (private) - # @yieldparam klazz Each class/module in the namespace. + # @param [Module] klass The namespace in which to start the search. + # @param [Hash] done The namespaces we've already visited (private) + # @yieldparam klass Each class/module in the namespace. # def recurse_namespace(klass, done={}, &block) return if !(Module === klass) || done[klass] @@ -139,10 +139,10 @@ class Pry # Gather all the methods in a namespace that pass the given block. # - # @param Module The namespace in which to search. - # @yieldparam Method The method to test - # @yieldreturn Boolean - # @return Array[Method] + # @param [Module] namespace The namespace in which to search. + # @yieldparam [Method] method The method to test + # @yieldreturn [Boolean] + # @return [Array] # def search_all_methods(namespace) done = Hash.new{ |h,k| h[k] = {} } @@ -163,8 +163,8 @@ class Pry # Search for all methods with a name that matches the given regex # within a namespace. # - # @param Module The namespace to search - # @return Array[Method] + # @param [Module] namespace The namespace to search + # @return [Array] # def name_search(namespace) search_all_methods(namespace) do |meth| @@ -175,8 +175,8 @@ class Pry # Search for all methods who's implementation matches the given regex # within a namespace. # - # @param Module The namespace to search - # @return Array[Method] + # @param [Module] namespace The namespace to search + # @return [Array] # def content_search(namespace) search_all_methods(namespace) do |meth| diff --git a/lib/pry/commands/help.rb b/lib/pry/commands/help.rb index d4c9473d..f105e8eb 100644 --- a/lib/pry/commands/help.rb +++ b/lib/pry/commands/help.rb @@ -37,7 +37,7 @@ class Pry # Display the index view, with headings and short descriptions per command. # - # @param Hash[String => Array[Commands]] + # @param [Hash>] groups def display_index(groups) help_text = [] @@ -56,7 +56,7 @@ class Pry # return the help string for those commands. # # @param [String] name The group name. - # @param [Array]] commands + # @param [Array] commands # @return [String] The generated help string. def help_text_for_commands(name, commands) "#{text.bold(name)}\n" << commands.map do |command| @@ -130,8 +130,8 @@ class Pry # otherwise a sub-Hash with every key that matches the search will # be returned. # - # @param [String] the search term - # @param [Hash] the hash to search + # @param [String] search the search term + # @param [Hash] hash the hash to search def search_hash(search, hash) matching = {} @@ -149,8 +149,8 @@ class Pry # Clean search terms to make it easier to search group names # - # @param String - # @return String + # @param [String] key + # @return [String] def normalize(key) key.downcase.gsub(/pry\W+/, '') end diff --git a/lib/pry/input_completer.rb b/lib/pry/input_completer.rb index 00d3c494..e13469ec 100644 --- a/lib/pry/input_completer.rb +++ b/lib/pry/input_completer.rb @@ -37,8 +37,8 @@ class Pry ] # Return a new completion proc for use by Readline. - # @param [Binding] target The current binding context. - # @param [Array] commands The array of Pry commands. + # @param [Binding] input The current binding context. + # @param [Array] options The array of Pry commands. def self.call(input, options) custom_completions = options[:custom_completions] || [] diff --git a/lib/pry/method/patcher.rb b/lib/pry/method/patcher.rb index 90aaa5d5..3f736f6d 100644 --- a/lib/pry/method/patcher.rb +++ b/lib/pry/method/patcher.rb @@ -69,8 +69,8 @@ class Pry # This is necessarily done by String manipulation because we can't find out what # syntax is needed for the argument list by ruby-level introspection. # - # @param String The original definition line. e.g. def self.foo(bar, baz=1) - # @return String The new definition line. e.g. def foo(bar, baz=1) + # @param [String] line The original definition line. e.g. def self.foo(bar, baz=1) + # @return [String] The new definition line. e.g. def foo(bar, baz=1) def definition_for_owner(line) if line =~ /\Adef (?:.*?\.)?#{Regexp.escape(method.original_name)}(?=[\(\s;]|$)/ "def #{method.original_name}#{$'}" diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb index 5872ee12..7e9e4adc 100644 --- a/lib/pry/pry_class.rb +++ b/lib/pry/pry_class.rb @@ -51,7 +51,7 @@ class Pry end # Load the given file in the context of `Pry.toplevel_binding` - # @param [String] file_name The unexpanded file path. + # @param [String] file The unexpanded file path. def self.load_file_at_toplevel(file) toplevel_binding.eval(File.read(file), file) rescue RescuableException => e @@ -166,7 +166,7 @@ class Pry # An inspector that clips the output to `max_length` chars. # In case of > `max_length` chars the `# notation is used. # - # @param [Object] object + # @param [Object] obj # The object to view. # # @param [Hash] options