Class: Ftpd::CommandHandler
- Inherits:
-
Object
- Object
- Ftpd::CommandHandler
- Extended by:
- Forwardable, Memoizer
- Includes:
- AsciiHelper, DataConnectionHelper, Error, FileSystemHelper
- Defined in:
- lib/ftpd/command_handler.rb
Overview
Command handler base class
Direct Known Subclasses
CmdAbor, CmdAllo, CmdAppe, CmdAuth, CmdCdup, CmdCwd, CmdDele, CmdEprt, CmdEpsv, CmdFeat, CmdHelp, CmdList, CmdLogin, CmdMdtm, CmdMkd, CmdMode, CmdNlst, CmdNoop, CmdOpts, CmdPasv, CmdPbsz, CmdPort, CmdProt, CmdPwd, CmdQuit, CmdRein, CmdRename, CmdRest, CmdRetr, CmdRmd, CmdSite, CmdSize, CmdSmnt, CmdStat, CmdStor, CmdStou, CmdStru, CmdSyst, CmdType
Constant Summary collapse
- COMMAND_FILENAME_PREFIX =
'cmd_'
- COMMAND_KLASS_PREFIX =
'Cmd'
- COMMAND_METHOD_PREFIX =
'cmd_'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(session) ⇒ CommandHandler
constructor
param session [Session] The session.
Methods included from FileSystemHelper
#ensure_accessible, #ensure_directory, #ensure_does_not_exist, #ensure_exists, #ensure_file_system_supports, #path_list, #unique_path
Methods included from Error
#error, #permanent_error, #sequence_error, #syntax_error, #transient_error, #unimplemented_error, #unrecognized_error
Methods included from DataConnectionHelper
#close_data_server_socket_when_done, #data_connection_description, #encrypt_data?, #handle_data_disconnect, #make_tls_connection, #open_active_data_connection, #open_active_tls_data_connection, #open_data_connection, #open_passive_data_connection, #open_passive_tls_data_connection, #receive_file, #send_start_of_data_connection_reply, #transmit_file
Methods included from AsciiHelper
#nvt_ascii_to_unix, #unix_to_nvt_ascii
Constructor Details
#initialize(session) ⇒ CommandHandler
param session [Session] The session
24 25 26 |
# File 'lib/ftpd/command_handler.rb', line 24 def initialize(session) @session = session end |
Class Method Details
.commands ⇒ Object
33 34 35 36 37 |
# File 'lib/ftpd/command_handler.rb', line 33 def commands public_instance_methods.map(&:to_s).grep(/#{COMMAND_METHOD_PREFIX}/).map do |method| method.gsub(/^#{COMMAND_METHOD_PREFIX}/, '') end end |