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 |
# File 'lib/pssh/client.rb', line 4 def initialize @pty = Pssh.pty = Pssh::Socket.new @web = Pssh.web = Pssh::WebConsole.new @app = Rack::Builder.new do map "/assets/" do run Rack::File.new "#{Pssh.base_path}/assets/" end map "/socket" do run Pssh.pty end map "/" do run Pssh.web end end Thread.new do @console = Console.new(pty: @pty, web: @web) end Thin::Logging.silent = true Rack::Handler::Thin.run @app, Port: Pssh.port end |
Class Method Details
.start ⇒ Object
25 26 27 |
# File 'lib/pssh/client.rb', line 25 def self.start Pssh.client = @client = Client.new end |