Class: Browsed::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/browsed/configuration.rb', line 8

def initialize
  self.driver               =   :selenium_chrome
  self.browser              =   :chrome
  
  self.environment          =   :production
  
  self.binary_path          =   "/usr/local/bin/phantomjs"
  
  self.root_path            =   File.expand_path(File.join(__FILE__, "../../.."))
  self.download_path        =   nil
  self.temp_path            =   "/tmp"
  
  self.maximum_processes    =   nil
  self.processes_max_ttl    =   60 * 30 # 30 minutes
  
  self.verbose              =   false
end

Instance Attribute Details

#binary_pathObject

Returns the value of attribute binary_path.



4
5
6
# File 'lib/browsed/configuration.rb', line 4

def binary_path
  @binary_path
end

#browserObject

Returns the value of attribute browser.



3
4
5
# File 'lib/browsed/configuration.rb', line 3

def browser
  @browser
end

#download_pathObject

Returns the value of attribute download_path.



4
5
6
# File 'lib/browsed/configuration.rb', line 4

def download_path
  @download_path
end

#driverObject

Returns the value of attribute driver.



3
4
5
# File 'lib/browsed/configuration.rb', line 3

def driver
  @driver
end

#environmentObject

Returns the value of attribute environment.



3
4
5
# File 'lib/browsed/configuration.rb', line 3

def environment
  @environment
end

#maximum_processesObject

Returns the value of attribute maximum_processes.



5
6
7
# File 'lib/browsed/configuration.rb', line 5

def maximum_processes
  @maximum_processes
end

#processes_max_ttlObject

Returns the value of attribute processes_max_ttl.



5
6
7
# File 'lib/browsed/configuration.rb', line 5

def processes_max_ttl
  @processes_max_ttl
end

#root_pathObject

Returns the value of attribute root_path.



4
5
6
# File 'lib/browsed/configuration.rb', line 4

def root_path
  @root_path
end

#temp_pathObject

Returns the value of attribute temp_path.



4
5
6
# File 'lib/browsed/configuration.rb', line 4

def temp_path
  @temp_path
end

#verboseObject

Returns the value of attribute verbose.



6
7
8
# File 'lib/browsed/configuration.rb', line 6

def verbose
  @verbose
end

Instance Method Details

#verbose?Boolean

Returns:

  • (Boolean)


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

def verbose?
  self.verbose
end