Sha256: 3e788f2cb9e375d4f2448a178e986469ecdcc2cedd58546a6e710b5c8b102286

Contents?: true

Size: 398 Bytes

Versions: 8

Compression:

Stored size: 398 Bytes

Contents

# frozen_string_literal: true
module FinAppsCore
  module Utils
    # Adds validation capabilities when included into other classes
    module Validatable
      using ObjectExtensions
      using StringExtensions

      def not_blank(value, name=nil)
        raise FinAppsCore::MissingArgumentsError.new "Missing argument#{": #{name}" unless name.nil?}" if value.blank?
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
finapps_core-2.0.14 lib/finapps_core/utils/validatable.rb
finapps_core-2.0.13 lib/finapps_core/utils/validatable.rb
finapps_core-2.0.12 lib/finapps_core/utils/validatable.rb
finapps_core-2.0.11 lib/finapps_core/utils/validatable.rb
finapps_core-2.0.10 lib/finapps_core/utils/validatable.rb
finapps_core-2.0.9 lib/finapps_core/utils/validatable.rb
finapps_core-2.0.8 lib/finapps_core/utils/validatable.rb
finapps_core-2.0.7 lib/finapps_core/utils/validatable.rb