Class: JsTestDriverConfig
- Inherits:
-
Object
- Object
- JsTestDriverConfig
- Defined in:
- lib/tasks/js_test_driver/js_test_driver_config.rb
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(dir, yaml, uri) ⇒ JsTestDriverConfig
constructor
A new instance of JsTestDriverConfig.
- #port ⇒ Object
- #reload ⇒ Object
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
#host ⇒ Object
14 15 16 |
# File 'lib/tasks/js_test_driver/js_test_driver_config.rb', line 14 def host return @server.host end |
#port ⇒ Object
18 19 20 |
# File 'lib/tasks/js_test_driver/js_test_driver_config.rb', line 18 def port return @server.port end |
#reload ⇒ Object
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 |