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

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

Instance Method Summary collapse

Instance Method Details

#resultObject



16
17
18
19
20
# File 'lib/convenient_service/examples/rails/v1/gemfile/services/assert_file_not_empty.rb', line 16

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

  success
end