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