Class: Bookbinder::Config::Validator
- Inherits:
-
Object
- Object
- Bookbinder::Config::Validator
- Defined in:
- lib/bookbinder/config/validator.rb
Instance Method Summary collapse
- #exceptions(config) ⇒ Object
-
#initialize(file_system_accessor) ⇒ Validator
constructor
A new instance of Validator.
Constructor Details
#initialize(file_system_accessor) ⇒ Validator
Returns a new instance of Validator.
12 13 14 |
# File 'lib/bookbinder/config/validator.rb', line 12 def initialize(file_system_accessor) @file_system_accessor = file_system_accessor end |
Instance Method Details
#exceptions(config) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bookbinder/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 |