Sha256: 7b3ce06faebf4873d69a1e5eea3aeca907cf66ccc58c5c87bc858a560faed028
Contents?: true
Size: 468 Bytes
Versions: 13
Compression:
Stored size: 468 Bytes
Contents
# frozen_string_literal: true module Mihari module Schemas module Concerns # # OR-rable concern # module Orrable extend ActiveSupport::Concern def compose_by_or schemas = constants.map { |sym| const_get sym } return schemas.first if schemas.length <= 1 base, *others = schemas others.each { |other| base = base.or(other) } base end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems