Class: Mysql2QueryFilter::Plugin::Log
- Inherits:
-
Base
- Object
- Base
- Mysql2QueryFilter::Plugin::Log
- Defined in:
- lib/mysql2_query_filter/plugin/log.rb
Instance Method Summary collapse
- #filter(sql, query_options) ⇒ Object
-
#initialize(options) ⇒ Log
constructor
A new instance of Log.
Constructor Details
#initialize(options) ⇒ Log
Returns a new instance of Log.
7 8 9 10 |
# File 'lib/mysql2_query_filter/plugin/log.rb', line 7 def initialize() super @out = @options[:out] || $stderr end |
Instance Method Details
#filter(sql, query_options) ⇒ Object
12 13 14 |
# File 'lib/mysql2_query_filter/plugin/log.rb', line 12 def filter(sql, ) @out << "#{sql}\n" end |