Class: Split::Configuration
- Inherits:
-
Object
- Object
- Split::Configuration
- Defined in:
- lib/split/configuration.rb
Instance Attribute Summary collapse
-
#allow_multiple_experiments ⇒ Object
Returns the value of attribute allow_multiple_experiments.
-
#db_failover ⇒ Object
Returns the value of attribute db_failover.
-
#db_failover_on_db_error ⇒ Object
Returns the value of attribute db_failover_on_db_error.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#ignore_ip_addresses ⇒ Object
Returns the value of attribute ignore_ip_addresses.
-
#robot_regex ⇒ Object
Returns the value of attribute robot_regex.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 |
# File 'lib/split/configuration.rb', line 10 def initialize @robot_regex = /\b(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg)\b/i @ignore_ip_addresses = [] @db_failover = false @db_failover_on_db_error = proc{|error|} # e.g. use Rails logger here @allow_multiple_experiments = false @enabled = true end |
Instance Attribute Details
#allow_multiple_experiments ⇒ Object
Returns the value of attribute allow_multiple_experiments.
7 8 9 |
# File 'lib/split/configuration.rb', line 7 def allow_multiple_experiments @allow_multiple_experiments end |
#db_failover ⇒ Object
Returns the value of attribute db_failover.
5 6 7 |
# File 'lib/split/configuration.rb', line 5 def db_failover @db_failover end |
#db_failover_on_db_error ⇒ Object
Returns the value of attribute db_failover_on_db_error.
6 7 8 |
# File 'lib/split/configuration.rb', line 6 def db_failover_on_db_error @db_failover_on_db_error end |
#enabled ⇒ Object
Returns the value of attribute enabled.
8 9 10 |
# File 'lib/split/configuration.rb', line 8 def enabled @enabled end |
#ignore_ip_addresses ⇒ Object
Returns the value of attribute ignore_ip_addresses.
4 5 6 |
# File 'lib/split/configuration.rb', line 4 def ignore_ip_addresses @ignore_ip_addresses end |
#robot_regex ⇒ Object
Returns the value of attribute robot_regex.
3 4 5 |
# File 'lib/split/configuration.rb', line 3 def robot_regex @robot_regex end |