class FtpWebApp

Constants

ABOUT
CONNECT
CONNECT_TO
FTP
#

Initialize the Ftp-Connection here.

#
LISTING
ROOT
#

The various constants for the URL actions.

#
STATUS
USE_THIS_PORT
WHERE_TO

Public Class Methods

new( run_already = true ) click to toggle source
#

initialize

#
Calls superclass method
# File lib/ftp_paradise/www/sinatra_web_interface.rb, line 54
def initialize(
    run_already = true
  )
  super
  run if run_already
end

Public Instance Methods

do_connect( where_to = WHERE_TO ) click to toggle source
#

do_connect

#
# File lib/ftp_paradise/www/sinatra_web_interface.rb, line 98
def do_connect(
    where_to = WHERE_TO
  )
  FTP.connect :to => where_to
end
port?() click to toggle source
#

port?

#
# File lib/ftp_paradise/www/sinatra_web_interface.rb, line 213
def port?
  USE_THIS_PORT.to_s
end
report_port() click to toggle source
#

report_port

#
# File lib/ftp_paradise/www/sinatra_web_interface.rb, line 204
def report_port
  cliner {
    e 'We will use the port '+sfancy(port?)+' ( http://localhost:'+port?+'/ ).'
  }
end
run() click to toggle source
#

run

#
# File lib/ftp_paradise/www/sinatra_web_interface.rb, line 233
def run
  report_port
  self.class.run!
end
show_status() click to toggle source
#

show_status

#
# File lib/ftp_paradise/www/sinatra_web_interface.rb, line 166
def show_status
  _ = h2 'The status is as follows:'+br
  _ << 'We are connected to: '+b(FTP.connected_to?,
        '','','text-decoration: underline')+br+br
  _ << FTP.status?+br
  _ << link_to_everything
end