diff --git a/lib/pry/default_commands/documentation.rb b/lib/pry/default_commands/documentation.rb index add44890..d1ddd919 100644 --- a/lib/pry/default_commands/documentation.rb +++ b/lib/pry/default_commands/documentation.rb @@ -22,8 +22,9 @@ class Pry doc = process_comment_markup(meth.doc, meth.source_type) output.puts make_header(meth, doc) - output.puts "#{text.bold("visibility: ")} #{meth.visibility}" - output.puts "#{text.bold("signature: ")} #{meth.signature}" + output.puts "#{text.bold("Owner:")} #{meth.owner || "N/A"}" + output.puts "#{text.bold("Visibility:")} #{meth.visibility}" + output.puts "#{text.bold("Signature:")} #{meth.signature}" output.puts render_output(opts.flood?, false, doc) end diff --git a/lib/pry/default_commands/introspection.rb b/lib/pry/default_commands/introspection.rb index dee454f5..5ef4e05e 100644 --- a/lib/pry/default_commands/introspection.rb +++ b/lib/pry/default_commands/introspection.rb @@ -21,6 +21,9 @@ class Pry raise CommandError, "Could not find method source" unless meth.source output.puts make_header(meth) + output.puts "#{text.bold("Owner:")} #{meth.owner || "N/A"}" + output.puts "#{text.bold("Visibility:")} #{meth.visibility}" + output.puts if Pry.color code = CodeRay.scan(meth.source, meth.source_type).term @@ -72,6 +75,7 @@ class Pry set_file_and_dir_locals(block.source_file) output.puts make_header(block) + output.puts if Pry.color code = CodeRay.scan(block.source, :ruby).term diff --git a/lib/pry/helpers/command_helpers.rb b/lib/pry/helpers/command_helpers.rb index 7a8fc937..82e3d155 100644 --- a/lib/pry/helpers/command_helpers.rb +++ b/lib/pry/helpers/command_helpers.rb @@ -63,7 +63,7 @@ class Pry header << "@ line #{meth.source_line}:\n" end - header << "Number of lines: #{Pry::Helpers::Text.bold(content.each_line.count.to_s)}\n\n" + header << "#{Pry::Helpers::Text.bold("Number of lines:")} #{content.each_line.count.to_s}\n" end def file_map diff --git a/lib/pry/version.rb b/lib/pry/version.rb index 40ea4f85..faaf7e80 100644 --- a/lib/pry/version.rb +++ b/lib/pry/version.rb @@ -1,3 +1,3 @@ class Pry - VERSION = "0.9.6.2" + VERSION = "0.9.7" end