Class: LogMagic::MySqlPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/log_magic/printers/mysql_printer.rb

Instance Method Summary collapse

Constructor Details

#initialize(mysql_query, uuid) ⇒ MySqlPrinter

Returns a new instance of MySqlPrinter.



2
3
4
5
# File 'lib/log_magic/printers/mysql_printer.rb', line 2

def initialize(mysql_query, uuid)
  @mysql_query = mysql_query
  @uuid = uuid
end

Instance Method Details



7
8
9
10
11
12
13
14
15
16
# File 'lib/log_magic/printers/mysql_printer.rb', line 7

def print
  """
  MySQL query generated by Rails
  ----
  #{@mysql_query}
  ----
  Copy and view in browser: http://localhost:#{::LogMagic::MySqlExplainer.port_number}/#{@uuid}
  <------------------------------------------>
  """
end