Class: Example::Main

Inherits:
Object
  • Object
show all
Includes:
Ftpd::InsecureCertificate
Defined in:
examples/example.rb

Instance Method Summary collapse

Methods included from Ftpd::InsecureCertificate

#insecure_certfile_path

Constructor Details

#initialize(argv) ⇒ Main

Returns a new instance of Main.



173
174
175
176
177
178
179
180
181
182
183
184
# File 'examples/example.rb', line 173

def initialize(argv)
  @args = Arguments.new(argv)
  @data_dir = Ftpd::TempDir.make
  create_files
  @driver = Driver.new(user, password, ,
                       @data_dir, @args.read_only)
  @server = Ftpd::FtpServer.new(@driver)
  configure_server
  @server.start
  display_connection_info
  create_connection_script
end

Instance Method Details

#runObject



186
187
188
# File 'examples/example.rb', line 186

def run
  wait_until_stopped
end