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
25 26 27 |
# File 'lib/ftpd/command_handler.rb', line 25 def initialize(session) @session = session end |
Class Method Details
.commands ⇒ Object
34 35 36 37 38 |
# File 'lib/ftpd/command_handler.rb', line 34 def commands public_instance_methods.map(&:to_s).grep(/#{COMMAND_METHOD_PREFIX}/).map do |method| method.gsub(/^#{COMMAND_METHOD_PREFIX}/, '') end end |