class Bookwatch::Config::Validator

Public Class Methods

new(file_system_accessor) click to toggle source
# File lib/bookwatch/config/validator.rb, line 12
def initialize(file_system_accessor)
  @file_system_accessor = file_system_accessor
end

Public Instance Methods

exceptions(config) click to toggle source
# File lib/bookwatch/config/validator.rb, line 16
def exceptions(config)
  exceptions = [
    Checkers::RequiredKeysChecker.new,
    Checkers::DuplicateSectionNameChecker.new,
    Checkers::RepositoryNamePresenceChecker.new,
    Checkers::SectionPresenceChecker.new,
    Checkers::DitamapPresenceChecker.new,
    Checkers::ArchiveMenuChecker.new(@file_system_accessor),
    Checkers::ProductsChecker.new
  ].map do |checker|
    checker.check(config)
  end

  exceptions.compact
end