Sha256: fa69fdc4be3f5a92a9c7a84c4b5c87941e140dda4232100fb841afad17d43e65
Contents?: true
Size: 673 Bytes
Versions: 11
Compression:
Stored size: 673 Bytes
Contents
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
11 entries across 11 versions & 2 rubygems