Class: JsTestDriverConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/tasks/js_test_driver/js_test_driver_config.rb

Instance Method Summary collapse

Constructor Details

#initialize(dir, yaml, uri) ⇒ JsTestDriverConfig

Returns a new instance of JsTestDriverConfig.



3
4
5
6
7
# File 'lib/tasks/js_test_driver/js_test_driver_config.rb', line 3

def initialize(dir, yaml, uri)
  @config_file = dir + '/jsTestDriver.conf'
  @yaml = yaml
  @uri = uri
end

Instance Method Details

#hostObject



14
15
16
# File 'lib/tasks/js_test_driver/js_test_driver_config.rb', line 14

def host
  return @server.host
end

#portObject



18
19
20
# File 'lib/tasks/js_test_driver/js_test_driver_config.rb', line 18

def port
  return @server.port
end

#reloadObject



9
10
11
12
# File 'lib/tasks/js_test_driver/js_test_driver_config.rb', line 9

def reload
  @conf = @yaml.load_file(@config_file)
  @server = @uri.parse(@conf['server'])
end