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

Methods included from Config

included

Instance Method Details

#resultObject



25
26
27
28
29
# File 'lib/convenient_service/examples/dry/v1/gemfile/services/assert_file_not_empty.rb', line 25

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

  success
end