Module: ArchUnit::Common::FluentApi::Checkable

Overview

The shared execution contract implemented by every terminal rule.

Instance Method Summary collapse

Instance Method Details

#check(options = nil) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/archunit/common/fluentapi/checkable.rb', line 13

def check(options = nil)
  resolved_options = CheckOptions.resolve(options)
  logger = Logging::CheckLogger.new(resolved_options.logging)
  check_name = self.class.name || self.class.to_s
  logger.start_check(check_name)
  execute_check(resolved_options, logger, check_name)
ensure
  logger&.close
end