Sha256: 0bb724ebee2f0db158a1f34e682d142d55c340dc7c2cf1399f1cfc979456322c
Contents?: true
Size: 400 Bytes
Versions: 7
Compression:
Stored size: 400 Bytes
Contents
# frozen_string_literal: true class Serega module SeregaValidations module Utils class CheckOptIsHash def self.call(opts, key) return unless opts.key?(key) value = opts[key] return if value.is_a?(Hash) raise SeregaError, "Invalid option #{key.inspect} => #{value.inspect}. Must have a Hash value" end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems