Sha256: 1bb2ab1c86f6668b1081411e85bf92e7660717dcaf26ef204047aa1242f136fe
Contents?: true
Size: 477 Bytes
Versions: 15
Compression:
Stored size: 477 Bytes
Contents
# frozen_string_literal: true using ObjectExtensions using StringExtensions module FinAppsCore module Utils # Adds validation capabilities when included into other classes module Validatable def not_blank(value, name = nil) raise FinAppsCore::MissingArgumentsError, name.nil? ? nil : ": #{name}" if nil_or_empty?(value) end def nil_or_empty?(value) !value || value.respond_to?(:empty?) && value.empty? end end end end
Version data entries
15 entries across 15 versions & 1 rubygems