Skip to content

Instantly share code, notes, and snippets.

@rmanalan
Created March 12, 2009 19:22
Show Gist options
  • Save rmanalan/78243 to your computer and use it in GitHub Desktop.
Save rmanalan/78243 to your computer and use it in GitHub Desktop.
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
require 'logger'
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
end
class Object
def local_methods
(methods - Object.instance_methods).sort
end
end
require 'pp'
# What are the methods which belong only to an object, and not those inherited from Object
class Object
def my_methods
(self.methods - Object.methods).sort
end
end
# strip html tags from a string
class String
def strip_tags
self.gsub(/<\S[^><]*>/,"")
end
end
# load libraries
require 'rubygems'
require 'wirble'
# start wirble (with color)
Wirble.init
Wirble.colorize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment