Sha256: fb0a8766f5eca370a53b25ad1485bf14dbf806b706d644fc0771a615596abd9d
Contents?: true
Size: 577 Bytes
Versions: 13
Compression:
Stored size: 577 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Examples module Dry module Gemfile module Services class AssertFileExists include DryService::Config option :path contract do schema do required(:path).filled(:string) end end 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
13 entries across 13 versions & 1 rubygems