Sha256: 2ac8f7b73fa7a38a7b99d054301024677b6bdf64f0575c42e9cbc0dcdf0d779e
Contents?: true
Size: 704 Bytes
Versions: 6
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true require_relative 'command_handler' module Ftpd class CmdHelp < CommandHandler def cmd_help(argument) if argument command = argument.upcase if supported_commands.include?(command) reply "214 Command #{command} is recognized" else reply "214 Command #{command} is not recognized" end else reply '214-The following commands are recognized:' supported_commands.sort.each_slice(8) do |commands| line = commands.map do |command| ' %-4s' % command end.join reply line end reply '214 Have a nice day.' end end end end
Version data entries
6 entries across 6 versions & 1 rubygems