Class: Pssh::Client
- Inherits:
-
Object
- Object
- Pssh::Client
- Defined in:
- lib/pssh/client.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/pssh/client.rb', line 4 def initialize @pty = Pssh.pty = Pssh::Pty.new @socket = Pssh.socket = Pssh::Socket.new @web = Pssh.web = Pssh::Web.new @app = Rack::Builder.new do map "/assets/" do run Rack::File.new "#{Pssh.base_path}/assets/" end map "/socket" do run Pssh.socket end map "/" do run Pssh.web end end Thin::Logging.silent = true if Pssh.pty.existing? Thread.new do @console = Console.new end end Rack::Handler::Thin.run @app, Port: Pssh.port end |