Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 43 lines (33 sloc) 0.63 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#libaries
require 'rubygems' rescue nil
require 'wirble'
require 'hirb'
require 'pp'

#load wirble
Wirble.init
Wirble.colorize

# set up hirb
extend Hirb::Console

require 'utility_belt'
UtilityBelt.equip

class Object
  def search_methods(regex)
    self.methods.select {|m| m =~ regex}
  end
  
  def my_methods
    (self.methods - Object.methods).sort
  end

  def tap
    yield self
    self
  end

  def tapp
    pp self
    self
  end
end

def debug_active_record(to_stdio = true)
  ActiveRecord::Base.logger = Logger.new(STDOUT)
  ActiveRecord::Base.logger.level = to_stdio ? Logger::DEBUG : Logger::WARN
  
  reload!
end
Something went wrong with that request. Please try again.