Follow the Brass

lib/final_inspection.rb

13 lines · ruby

Project files
# frozen_string_literal: true

require_relative "admission"

class FinalInspection
  def initialize(required_facts:)
    @required_facts = required_facts.dup.freeze
  end

  def assess(work)
    Admission.new(reasons: @required_facts.reject { |fact| work.fact?(fact) })
  end
end

Read along in the manual: The Reloading Lab · Download the project (zip)