module ProductionBreakpoints::StartEndLineValidator
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
Public Instance Methods
call(source_file, start_line, end_line)
click to toggle source
# 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