Sha256: 722f50a26a9f4c9941dd0af0374ab9ee41d5872d9738475cb2728628aeb10a92
Contents?: true
Size: 272 Bytes
Versions: 14
Compression:
Stored size: 272 Bytes
Contents
require 'haveapi/client/validator' module HaveAPI::Client class Validators::Presence < Validator name :present def valid? return false if value.nil? return !value.strip.empty? if !opts[:empty] && value.is_a?(::String) true end end end
Version data entries
14 entries across 14 versions & 1 rubygems