module Boleite::InputRouter::Contracts

Defined in:

boleite/input/input_router.cr

Constant Summary

CLASS_DATA = ClassData(Boleite::InputRouter).new
CONTRACTED_METHODS = ["initialize()", "register(receiver)", "register_at(index, receiver)", "unregister(receiver)", "process(event : Boleite::InputEvent)"] of _
CONTRACTS = {:next_def => nil, def register(receiver) @receivers << receiver end => [{:requires, "(@receivers.includes?(receiver)) == false", do (@receivers.includes?(receiver)) == false end}, {:requires, "receiver != self", do receiver != self end}], def register_at(index, receiver) @receivers.insert(index, receiver) end => [{:requires, "(@receivers.includes?(receiver)) == false", do (@receivers.includes?(receiver)) == false end}, {:requires, "receiver != self", do receiver != self end}]} of _ => _
IGNORED_METHODS = ["finalize", "contract_pre_register", "contract_post_register", "contract_requires_register", "contract_ensures_register", "contract_pre_register_at", "contract_post_register_at", "contract_requires_register_at", "contract_ensures_register_at"] of _
INVARIANTS = [] of _

Class Method Summary

Macro Summary

Class Method Detail

def self.on_assert_fail(condition, type) #

[View source]
def self.on_contract_fail(contract, condition, type, method) #

[View source]

Macro Detail

macro add_contract(stage, str, &test) #

[View source]
macro add_invariant(str, &test) #

[View source]
macro ignore_method(method) #

[View source]