Sha256: 5adcb51d2f25d3c668fa246029789e430fa04aee2252c6a74aa1200711e5afd8
Contents?: true
Size: 309 Bytes
Versions: 3
Compression:
Stored size: 309 Bytes
Contents
# frozen_string_literal: true module JsonStatham module Validation def self.check_object_class(object, expected_classes = []) return if expected_classes.include?(object.class) raise ArgumentError, "Expect #{object} class to be #{expected_classes.join(', ')}" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
json_statham-0.1.3 | lib/json_statham/validation.rb |
json_statham-0.1.2 | lib/json_statham/validation.rb |
json_statham-0.1.0 | lib/json_statham/validation.rb |