Class: ConvenientService::Examples::Dry::V1::Gemfile::Services::AssertFileNotEmpty

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

Instance Method Summary collapse

Instance Method Details

#resultObject



20
21
22
23
24
# File 'lib/convenient_service/examples/dry/v1/gemfile/services/assert_file_not_empty.rb', line 20

def result
  return error(message: "File with path `#{path}` is empty") if ::File.zero?(path)

  success
end