Sha256: 8bb721669401affbadaf760c5738e7c0a58efcc2e44eafcf93f953d1eb431394
Contents?: true
Size: 670 Bytes
Versions: 4
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Examples module Rails module V1 class Gemfile module Services class AssertFileNotEmpty include RailsService::Config attribute :path, :string validates :path, presence: true if ConvenientService::Dependencies.support_has_j_send_result_params_validations_using_active_model_validations? def result return error(message: "File with path `#{path}` is empty") if ::File.zero?(path) success end end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems