Class: ConvenientService::Examples::Rails::Gemfile::Services::AssertFileExists

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

Instance Method Summary collapse

Instance Method Details

#resultObject



15
16
17
18
19
# File 'lib/convenient_service/examples/rails/gemfile/services/assert_file_exists.rb', line 15

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

  success
end