Sha256: e6ef651ad3410d630f647563dc60eaa7b14b0f5ec865ac014e7caf660a4429eb
Contents?: true
Size: 330 Bytes
Versions: 6
Compression:
Stored size: 330 Bytes
Contents
# frozen_string_literal: true Object.class_eval do unless method_defined?(:presence!) # Returns self if `present?` # # @raise [BlankObject] if `blank?` # # @return [*] # def presence! raise(RubyRailsExtensions::Errors::BlankObjectError, 'Blank object') if blank? self end end end
Version data entries
6 entries across 6 versions & 1 rubygems