1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

add owner to method headers

This commit is contained in:
Ryan Fitzgerald 2011-10-25 21:23:56 -07:00
parent a1d148199f
commit 232f9f37c9
4 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,3 +1,3 @@
class Pry
VERSION = "0.9.6.2"
VERSION = "0.9.7"
end