Class: Ftpd::CommandHandler
- Inherits:
-
Object
- Object
- Ftpd::CommandHandler
- Extended by:
- Forwardable, Memoizer
- Includes:
- 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, #sequence_error, #syntax_error, #unimplemented_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
Constructor Details
#initialize(session) ⇒ CommandHandler
param session [Session] The session
23 24 25 |
# File 'lib/ftpd/command_handler.rb', line 23 def initialize(session) @session = session end |
Class Method Details
.commands ⇒ Object
32 33 34 35 36 |
# File 'lib/ftpd/command_handler.rb', line 32 def commands public_instance_methods.map(&:to_s).grep(/#{COMMAND_METHOD_PREFIX}/).map do |method| method.gsub(/^#{COMMAND_METHOD_PREFIX}/, '') end end |