Sha256: 62a77559be437fd4b6a073f977f241dac88b9b7eef20d91bf8b5bad716dfa1aa
Contents?: true
Size: 293 Bytes
Versions: 1
Compression:
Stored size: 293 Bytes
Contents
# frozen_string_literal: true require 'active_model' class TypeValidator class ByRespondTo def self.invalid?(value, options) method_name = options[:respond_to] return if value.respond_to?(method_name) "must respond to the method `#{method_name}`" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
type_validator-0.7.0 | lib/type_validator/by_respond_to.rb |