class HttpFind::Output
Constants
- LINENUM_COLOR
Public Class Methods
new(matches)
click to toggle source
# File lib/http_find/output.rb, line 5 def initialize(matches) @matches = matches end
Public Instance Methods
lines()
click to toggle source
# File lib/http_find/output.rb, line 9 def lines justlen = @matches.map { |m| m[:line] }.sort.last.to_s.length @matches.map do |m| line = m[:line].to_s.rjust(justlen).colorize(LINENUM_COLOR) text = m[:text] line + " | ".colorize(LINENUM_COLOR) + text end end