Class: Example::Main
- Inherits:
-
Object
- Object
- Example::Main
- Includes:
- Ftpd::InsecureCertificate
- Defined in:
- examples/example.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Main
constructor
A new instance of Main.
- #run ⇒ Object
Methods included from Ftpd::InsecureCertificate
Constructor Details
#initialize(argv) ⇒ Main
Returns a new instance of Main.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'examples/example.rb', line 145 def initialize(argv) @args = Arguments.new(argv) @data_dir = Ftpd::TempDir.make create_files @driver = Driver.new(user, password, account, @data_dir, @args.read_only) @server = Ftpd::FtpServer.new(@driver) @server.interface = @args.interface @server.port = @args.port @server.tls = @args.tls @server.certfile_path = insecure_certfile_path if @args.eplf @server.list_formatter = Ftpd::ListFormat::Eplf end @server.auth_level = auth_level @server.start display_connection_info create_connection_script end |
Instance Method Details
#run ⇒ Object
165 166 167 |
# File 'examples/example.rb', line 165 def run wait_until_stopped end |