Sha256: 87ae071d99871a865fa7106d8ebd7e7a1e99a66ff15a92bf7d0f3ff69503ff01

Contents?: true

Size: 315 Bytes

Versions: 1

Compression:

Stored size: 315 Bytes

Contents

module Mihari
  module Schemas
    module Mixins
      def get_or_composition
        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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mihari-5.6.2 lib/mihari/schemas/mixins.rb