Module: Rigor::Type::AcceptanceRouter
- Included in:
- Bot, BoundMethod, Constant, DataClass, DataInstance, Difference, Dynamic, HashShape, IntegerRange, Intersection, Nominal, Refined, Singleton, StructClass, StructInstance, Top, Tuple, Union
- Defined in:
- lib/rigor/type/acceptance_router.rb
Overview
Routes accepts through the engine's acceptance dispatcher.
Every carrier's acceptance check is the same fixed forwarding on self —
Inference::Acceptance.accepts(self, other, mode: mode) — so it lived as an identical copy in
fourteen carriers. The one exception is Type::App, which forwards on its reduced bound type rather
than self; it keeps its own accepts and does not include this.
Instance Method Summary collapse
Instance Method Details
#accepts(other, mode: :gradual) ⇒ Object
12 13 14 |
# File 'lib/rigor/type/acceptance_router.rb', line 12 def accepts(other, mode: :gradual) Inference::Acceptance.accepts(self, other, mode: mode) end |