Method: FileSource::Component#start_line

Defined in:
app/components/lookbook/file_source/component.rb

#start_lineObject



50
51
52
53
54
55
56
57
# File 'app/components/lookbook/file_source/component.rb', line 50

def start_line
  if lines_around_highlight && @highlight_lines.any?
    start = @highlight_lines.first - lines_around_highlight
    (start > 0) ? start : 1
  else
    @start_line
  end
end