Class: Split::Configuration
- Inherits:
-
Object
- Object
- Split::Configuration
- Defined in:
- lib/split/configuration.rb
Instance Attribute Summary collapse
-
#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.
-
#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.
8 9 10 11 12 13 |
# File 'lib/split/configuration.rb', line 8 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 end |
Instance Attribute Details
#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 |
#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 |