Sha256: b2e3a41835f1107b074264856e7627de296287e1bfe9761ff5ed010f601c3e24
Contents?: true
Size: 522 Bytes
Versions: 36
Compression:
Stored size: 522 Bytes
Contents
class ProjectSearch class Hit attr_reader :file, :line_num, :pre_context, :post_context def initialize(file, line_num, line, regex, pre_context, post_context) @file, @line_num, @line, @regex = file, line_num, line, regex @pre_context = pre_context @post_context = post_context end def line(start_with=nil, end_with=nil) @line.gsub(@regex) { start_with.to_s + $& + end_with.to_s } end def inspect "<Hit #{file}:#{line_num}>" end end end
Version data entries
36 entries across 36 versions & 2 rubygems