# frozen_string_literal: true module LIT module Builder # @api private # @since 0.1.0 class Option def initialize(mod, type) @type_checker = TypeChecker.new(mod) @type = type end def build mod = Module.new do include ::LIT::Object::Option end type_checker = @type_checker type = @type mod::Some.define_method(:check_type!) do |value| # NOTE: actually covered, but SimpleCov cannot detect that # :nocov: type_checker.check_type!(type, value) # :nocov: end mod end end end end