Class: Protractor::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/protractor/rails/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_fileObject

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_pathObject

Returns the value of attribute config_path.



26
27
28
# File 'lib/protractor/rails/configuration.rb', line 26

def config_path
  @config_path
end

#portObject

Returns the value of attribute port.



26
27
28
# File 'lib/protractor/rails/configuration.rb', line 26

def port
  @port
end

#serverObject

Returns the value of attribute server.



26
27
28
# File 'lib/protractor/rails/configuration.rb', line 26

def server
  @server
end

#spec_pathObject

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_timeoutObject

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