Module: EM::FTPD::FSD::Hooks
- Defined in:
- lib/em-ftpd-fsd/hooks.rb
Overview
Add callbacks methods to base class.
Instance Method Summary collapse
-
#after(command, method) ⇒ Object
Set a method to be called after FTP command is executed That method will be invoked with same arguments that FTP command and an extra parameter containig the value yielded by the FTP command.
-
#after_hooks ⇒ Array
Defined hooks to be executed after FTP commands.
-
#before(command, method) ⇒ Object
Set a method to be called before FTP command is executed That method will be invoked with same arguments that FTP command.
-
#before_hooks ⇒ Array
Defined hooks to be executed before FTP commands.
Instance Method Details
#after(command, method) ⇒ Object
Set a method to be called after FTP command is executed That method will be invoked with same arguments that FTP command and an extra parameter containig the value yielded by the FTP command
51 52 53 |
# File 'lib/em-ftpd-fsd/hooks.rb', line 51 def after( command, method ) after_hooks[command] = method end |
#after_hooks ⇒ Array
Defined hooks to be executed after FTP commands
63 64 65 |
# File 'lib/em-ftpd-fsd/hooks.rb', line 63 def after_hooks @after_hooks ||= {} end |
#before(command, method) ⇒ Object
Set a method to be called before FTP command is executed That method will be invoked with same arguments that FTP command
42 43 44 |
# File 'lib/em-ftpd-fsd/hooks.rb', line 42 def before( command, method ) before_hooks[command] = method end |
#before_hooks ⇒ Array
Defined hooks to be executed before FTP commands
57 58 59 |
# File 'lib/em-ftpd-fsd/hooks.rb', line 57 def before_hooks @before_hooks ||= {} end |