Exception: MarkdownRecord::Errors::DuplicateFilenameError

Inherits:
Base
  • Object
show all
Defined in:
lib/markdown_record/errors/duplicate_filename_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(filenames) ⇒ DuplicateFilenameError



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/markdown_record/errors/duplicate_filename_error.rb', line 6

def initialize(filenames)
  msgs = []

  filenames.each do |f|
    if MarkdownRecord.config.ignore_numeric_prefix
      msgs << "There are multiple files that resolve to [#{f}] after numeric prefixes are ignored."
    else
      msgs << "There are multiple files that resolve to [#{f}]."
    end
  end

  super(msgs.join("\n"))
end