Sha256: 9157fd1bfd233bacaa7b550be467f7ae314e8383ad12e64c0edaa4022d68aa68
Contents?: true
Size: 612 Bytes
Versions: 12
Compression:
Stored size: 612 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Examples module Rails module Gemfile module Services class AssertFileExists include RailsService::Config attribute :path, :string validates :path, presence: true if ConvenientService::Dependencies.support_has_result_params_validations_using_active_model_validations? def result return error("File with path `#{path}` does NOT exist") unless ::File.exist?(path) success end end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems