Class: Glark::Lines
- Includes:
- Format
- Defined in:
- lib/glark/output/glark_lines.rb
Direct Known Subclasses
Constant Summary
Constants included from Highlight
Instance Attribute Summary
Attributes inherited from Formatted
Attributes inherited from Results
Instance Method Summary collapse
- #add_match(startline, endline) ⇒ Object
-
#initialize(file, spec) ⇒ Lines
constructor
A new instance of Lines.
- #write_matching(from, to) ⇒ Object
- #write_nonmatching(from, to) ⇒ Object
Methods included from Format
#print_line, #print_line_number, #println, #show_file_header
Methods included from Highlight
Methods inherited from Lines
#at_match_limit?, #display_matches?, #displayed_name, #print_line, #print_line_number, #process_end, #process_match, #set_status, #write_matches
Methods inherited from Common
#at_match_limit?, #display_matches?, #displayed_name, #process_match
Methods inherited from Formatted
Methods inherited from Results
Constructor Details
#initialize(file, spec) ⇒ Lines
Returns a new instance of Lines.
16 17 18 19 |
# File 'lib/glark/output/glark_lines.rb', line 16 def initialize file, spec super @print_context = @after != 0 || @before != 0 end |
Instance Method Details
#add_match(startline, endline) ⇒ Object
31 32 33 34 |
# File 'lib/glark/output/glark_lines.rb', line 31 def add_match startline, endline super set_status startline, endline end |
#write_matching(from, to) ⇒ Object
21 22 23 24 |
# File 'lib/glark/output/glark_lines.rb', line 21 def write_matching from, to show_file_header super end |
#write_nonmatching(from, to) ⇒ Object
26 27 28 29 |
# File 'lib/glark/output/glark_lines.rb', line 26 def write_nonmatching from, to show_file_header super end |