module

Lustra::Util

A set of method(s) useful for building Lustra ORM.

Instance methods

hash_union(h1 : Hash(A, B), h2 : Hash(C, D)) forall A, B, C, D

Return a new hash which is union of two hash (some kind of deep merge)

Source
lambda(u : U.class, v : V.class, &block : U -> V) forall U, V

Equivalent to ruby's lambda with one parameter. This method is useful combined with the macro system of Crystal.

Source