Class: Reth::JSONRPC::Server
- Inherits:
-
Object
- Object
- Reth::JSONRPC::Server
- Includes:
- Concurrent::Async
- Defined in:
- lib/reth/jsonrpc/server.rb
Instance Method Summary collapse
-
#initialize(app, host, port) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
#initialize(app, host, port) ⇒ Server
Returns a new instance of Server.
7 8 9 10 11 12 13 |
# File 'lib/reth/jsonrpc/server.rb', line 7 def initialize(app, host, port) super() @app = app @host = host @port = port end |
Instance Method Details
#start ⇒ Object
15 16 17 18 19 20 |
# File 'lib/reth/jsonrpc/server.rb', line 15 def start Rack::Handler::WEBrick.run App.new(@app), Host: @host, Port: @port rescue puts $! puts $!.backtrace[0,10].join("\n") end |