Module: Shiba::Console

Defined in:
lib/shiba/console.rb

Overview

Provides a ‘shiba’ command to analyze queries from the console. If required in IRB or Pry, the ‘shiba’ command will become available. Example: require ‘shiba/console’

shiba User.all

> <shiba results>

shiba “select * from users”

> <shiba results>

Defined Under Namespace

Classes: Command, ExplainRecord

Instance Method Summary collapse

Instance Method Details

#shiba(query) ⇒ Object



20
21
22
23
# File 'lib/shiba/console.rb', line 20

def shiba(query)
  @command ||= Command.new(self)
  @command.execute(query)
end