Class: ChemistryKit::Configuration
- Inherits:
-
Object
- Object
- ChemistryKit::Configuration
- Defined in:
- lib/chemistrykit/configuration.rb
Overview
Default configuration class
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#concurrency ⇒ Object
Returns the value of attribute concurrency.
-
#selenium_connect ⇒ Object
Returns the value of attribute selenium_connect.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(hash) ⇒ Configuration
13 14 15 16 17 18 19 20 |
# File 'lib/chemistrykit/configuration.rb', line 13 def initialize(hash) # set defaults @concurrency = 1 # overide with argument populate_with_hash hash validate_config end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
9 10 11 |
# File 'lib/chemistrykit/configuration.rb', line 9 def base_url @base_url end |
#concurrency ⇒ Object
Returns the value of attribute concurrency.
9 10 11 |
# File 'lib/chemistrykit/configuration.rb', line 9 def concurrency @concurrency end |
#selenium_connect ⇒ Object
Returns the value of attribute selenium_connect.
9 10 11 |
# File 'lib/chemistrykit/configuration.rb', line 9 def selenium_connect @selenium_connect end |
Class Method Details
.initialize_with_yaml(file) ⇒ Object
22 23 24 |
# File 'lib/chemistrykit/configuration.rb', line 22 def self.initialize_with_yaml(file) self.new symbolize_keys YAML.load_file file end |