Class: BinProxy::WebConsole

Inherits:
Sinatra::Base
  • Object
show all
Includes:
Logger
Defined in:
lib/binproxy/web_console.rb

Overview

Currently, the caller passes a block to .new which configures the Sinatra app. this config applies to the whole class, so technically we should probably use some sort of get_instance class method which builds a subclass for each invocation, but YAGNI.

Defined Under Namespace

Classes: WebSocketHandler

Class Method Summary collapse

Methods included from Logger

log

Class Method Details

.new_instance(&blk) ⇒ Object



13
14
15
16
17
# File 'lib/binproxy/web_console.rb', line 13

def self.new_instance(&blk)
  c = Class.new(self)
  c.configure &blk
  c.new
end