Class: ConvenientService::Examples::Dry::Gemfile::Services::AssertFileExists

Inherits:
Object
  • Object
show all
Includes:
DryService::Config
Defined in:
lib/convenient_service/examples/dry/gemfile/services/assert_file_exists.rb

Instance Method Summary collapse

Methods included from Config

included

Instance Method Details

#resultObject



24
25
26
27
28
# File 'lib/convenient_service/examples/dry/gemfile/services/assert_file_exists.rb', line 24

def result
  return failure("File with path `#{path}` does NOT exist") unless ::File.exist?(path)

  success
end