Sha256: 44c5bbb0fbf951766cb2f232ed3efcd3e3ff81734bd77598904c4ef38e4a491f
Contents?: true
Size: 620 Bytes
Versions: 4
Compression:
Stored size: 620 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Examples module Rails class Gemfile module Services class AssertFileExists 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 failure("File with path `#{path}` does NOT exist") unless ::File.exist?(path) success end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems