Module: Kotoshu::Validators

Defined in:
lib/kotoshu/validators.rb,
lib/kotoshu/validators/spelling_validator.rb,
sig/kotoshu.rbs

Overview

Framework integrations for validation layers (plan 89).

Soft dependency: ActiveModel is NOT in kotoshu.gemspec. The validator file soft-requires it exactly like Models::OnnxModel soft-requires onnxruntime (see CLAUDE.md); when it is absent the class still loads but raises a caller-friendly error on use.

Defined Under Namespace

Classes: ActiveModelUnavailable, SpellingValidator

Constant Summary collapse

ACTIVE_MODEL_LOADED =

True when ActiveModel was requireable at load time.

Returns:

  • (Boolean)
begin
  require "active_model"
  true
rescue LoadError
  false
end