Class: Config

Inherits:
Object
  • Object
show all
Defined in:
lib/testlab_sdk_ruby.rb

Instance Method Summary collapse

Constructor Details

#initialize(server_address, interval) ⇒ Config

Returns a new instance of Config.



8
9
10
11
# File 'lib/testlab_sdk_ruby.rb', line 8

def initialize(server_address, interval)
  @server_address = server_address
  @interval = interval
end

Instance Method Details

#connectObject



13
14
15
16
17
18
19
20
# File 'lib/testlab_sdk_ruby.rb', line 13

def connect
  client =
    Client.new({ server_address: @server_address, interval: @interval })
  client.fetch_features
  client.add_default_context
  client.timed_fetch(@interval)
  client
end