Class: SqlMetrics::Configuration
- Inherits:
-
Object
- Object
- SqlMetrics::Configuration
- Defined in:
- lib/sql_metrics.rb
Instance Attribute Summary collapse
-
#bots_regex ⇒ Object
Returns the value of attribute bots_regex.
-
#database_schema ⇒ Object
Returns the value of attribute database_schema.
-
#db_name ⇒ Object
Returns the value of attribute db_name.
-
#event_table_name ⇒ Object
Returns the value of attribute event_table_name.
-
#host ⇒ Object
Returns the value of attribute host.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#options ⇒ Object
Returns the value of attribute options.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#tty ⇒ Object
Returns the value of attribute tty.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sql_metrics.rb', line 12 def initialize self.host = nil self.port = 5432 self. = nil self.tty = nil self.db_name = nil self.user = nil self.password = nil self.database_schema = 'public' self.event_table_name = 'events' self.bots_regex = /Googlebot|Pingdom|bing|Yahoo|Amazon|Twitter|Yandex|majestic12/i self.logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) end |
Instance Attribute Details
#bots_regex ⇒ Object
Returns the value of attribute bots_regex.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def bots_regex @bots_regex end |
#database_schema ⇒ Object
Returns the value of attribute database_schema.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def database_schema @database_schema end |
#db_name ⇒ Object
Returns the value of attribute db_name.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def db_name @db_name end |
#event_table_name ⇒ Object
Returns the value of attribute event_table_name.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def event_table_name @event_table_name end |
#host ⇒ Object
Returns the value of attribute host.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def host @host end |
#logger ⇒ Object
Returns the value of attribute logger.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def logger @logger end |
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def port @port end |
#tty ⇒ Object
Returns the value of attribute tty.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def tty @tty end |
#user ⇒ Object
Returns the value of attribute user.
9 10 11 |
# File 'lib/sql_metrics.rb', line 9 def user @user end |