Sha256: 8eef6516ca27653e6c2aee10700d284aabfc276a711b7f265ec76692e05a7e9c
Contents?: true
Size: 618 Bytes
Versions: 1
Compression:
Stored size: 618 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 error("File with path `#{path}` does NOT exist") unless ::File.exist?(path) success end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
convenient_service-0.13.0 | lib/convenient_service/examples/rails/gemfile/services/assert_file_exists.rb |