lib/simple_tasks_ruby/services/file_writer_service.rb
# Filename is an input argument to this method,
# becuase we might want to write different results to different files
Filename is an input argument to this method,
becuase we might want to write different results to different files
Filename is an input argument to this method becuase we might want to write different results to different files
def save(filename, lines)
      return if filename.blank? || lines.blank?
      create_directory_if_not_exists
      path_to_file = File.join(@foldername, filename)
      save_to_file(path_to_file, lines)
    end
def save ( filename , lines ) return if filename . blank? || lines . blank? create_directory_if_not_exists path_to_file = File . join ( @foldername , filename ) save_to_file ( path_to_file , lines ) end
Filename is an input argument to this method,
becuase we might want to write different results to different files
Filename is an input argument to this method becuase we might want to write different results to different files
filename
lines