Class: Drnbench::ProtocolAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/drnbench/server/protocol-adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ProtocolAdapter

Returns a new instance of ProtocolAdapter.


22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/drnbench/server/protocol-adapter.rb', line 22

def initialize(config)
  @config = config

  @host = @config.host
  @port = @config.port
  @receive_port = @config.receive_port
  @default_dataset = @config.default_dataset

  @application_dir = Pathname(@config.application_dir)
  @node = @config.node
  @node_options = @config.node_options
end

Instance Attribute Details

#portObject (readonly)

Returns the value of attribute port


20
21
22
# File 'lib/drnbench/server/protocol-adapter.rb', line 20

def port
  @port
end

Instance Method Details

#application_fileObject


43
44
45
# File 'lib/drnbench/server/protocol-adapter.rb', line 43

def application_file
  @application_dir + "application.js"
end

#startObject


35
36
37
# File 'lib/drnbench/server/protocol-adapter.rb', line 35

def start
  setup
end

#stopObject


39
40
41
# File 'lib/drnbench/server/protocol-adapter.rb', line 39

def stop
  teardown
end