Class: Protractor::Configuration
- Inherits:
-
Object
- Object
- Protractor::Configuration
- Defined in:
- lib/protractor/rails/configuration.rb
Instance Attribute Summary collapse
-
#config_file ⇒ Object
Returns the value of attribute config_file.
-
#config_path ⇒ Object
Returns the value of attribute config_path.
-
#port ⇒ Object
Returns the value of attribute port.
-
#server ⇒ Object
Returns the value of attribute server.
-
#spec_path ⇒ Object
Returns the value of attribute spec_path.
-
#startup_timeout ⇒ Object
Returns the value of attribute startup_timeout.
Instance Method Summary collapse
- #get(*keys) ⇒ Object
-
#initialize(data = nil) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(data = nil) ⇒ Configuration
Returns a new instance of Configuration.
33 34 35 36 37 38 39 40 41 |
# File 'lib/protractor/rails/configuration.rb', line 33 def initialize ( data=nil ) @data = data @config_path = get( :config_path ) || 'spec/javascripts' @config_file = get( :config_file ) || 'protractor.conf.js' @spec_path = get( :spec_path ) || 'spec/javascripts' @startup_timeout = get( :startup_timeout ) || 8 @server = get( :server ) || 'webrick' @port = get( :port ) || 4000 end |
Instance Attribute Details
#config_file ⇒ Object
Returns the value of attribute config_file.
26 27 28 |
# File 'lib/protractor/rails/configuration.rb', line 26 def config_file @config_file end |
#config_path ⇒ Object
Returns the value of attribute config_path.
26 27 28 |
# File 'lib/protractor/rails/configuration.rb', line 26 def config_path @config_path end |
#port ⇒ Object
Returns the value of attribute port.
26 27 28 |
# File 'lib/protractor/rails/configuration.rb', line 26 def port @port end |
#server ⇒ Object
Returns the value of attribute server.
26 27 28 |
# File 'lib/protractor/rails/configuration.rb', line 26 def server @server end |
#spec_path ⇒ Object
Returns the value of attribute spec_path.
26 27 28 |
# File 'lib/protractor/rails/configuration.rb', line 26 def spec_path @spec_path end |
#startup_timeout ⇒ Object
Returns the value of attribute startup_timeout.
26 27 28 |
# File 'lib/protractor/rails/configuration.rb', line 26 def startup_timeout @startup_timeout end |
Instance Method Details
#get(*keys) ⇒ Object
43 44 45 |
# File 'lib/protractor/rails/configuration.rb', line 43 def get *keys keys.inject( @data ) { |result, key| result.try :[], key.to_s } end |