Class: SqlMetrics::Configuration
- Inherits:
-
Object
- Object
- SqlMetrics::Configuration
- Defined in:
- lib/sql_metrics/config.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.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sql_metrics/config.rb', line 11 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|baidu|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.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def bots_regex @bots_regex end |
#database_schema ⇒ Object
Returns the value of attribute database_schema.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def database_schema @database_schema end |
#db_name ⇒ Object
Returns the value of attribute db_name.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def db_name @db_name end |
#event_table_name ⇒ Object
Returns the value of attribute event_table_name.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def event_table_name @event_table_name end |
#host ⇒ Object
Returns the value of attribute host.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def host @host end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def logger @logger end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def @options end |
#password ⇒ Object
Returns the value of attribute password.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def port @port end |
#tty ⇒ Object
Returns the value of attribute tty.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def tty @tty end |
#user ⇒ Object
Returns the value of attribute user.
8 9 10 |
# File 'lib/sql_metrics/config.rb', line 8 def user @user end |