Module: PpSql::ToSqlBeautify
- Defined in:
- lib/pp_sql.rb
Instance Method Summary collapse
Instance Method Details
#pp_sql ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/pp_sql.rb', line 40 def pp_sql if ::PpSql.rewrite_to_sql_method puts to_sql else extend Formatter puts _sql_formatter.format(to_sql.to_s) end end |
#to_sql ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/pp_sql.rb', line 31 def to_sql if ::PpSql.rewrite_to_sql_method extend Formatter _sql_formatter.format(defined?(super) ? super.dup : dup) else defined?(super) ? super : self end end |