Module: ProductionBreakpoints::StartEndLineValidator
- Defined in:
- lib/ruby-production-breakpoints/start_end_line_validator.rb
Overview
Validate that start line and end line point to code into the file At the momemt it will be valid if both start and end line points to valid ruby code
Class Method Summary collapse
Class Method Details
.call(source_file, start_line, end_line) ⇒ Object
9 10 11 12 13 |
# File 'lib/ruby-production-breakpoints/start_end_line_validator.rb', line 9 def call(source_file, start_line, end_line) source_lines = File.read(source_file).lines !source_lines[start_line - 1].strip.empty? && !source_lines[end_line - 1].strip.empty? end |