From 547f85dcfafaf9210ebc62c793f91a3bfb94c374 Mon Sep 17 00:00:00 2001 From: Aizat Faiz Date: Wed, 26 May 2010 21:57:28 +0800 Subject: [PATCH] Include ackrc --- ackrc | 7 +++++++ irbrc | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ackrc create mode 100644 irbrc diff --git a/ackrc b/ackrc new file mode 100644 index 0000000..8004f9f --- /dev/null +++ b/ackrc @@ -0,0 +1,7 @@ +--type-add +xml=builder +#ruby=haml +#html=erb +--smart-case +--nosql +--ignore-dir=wp-content diff --git a/irbrc b/irbrc new file mode 100644 index 0000000..fe52ef7 --- /dev/null +++ b/irbrc @@ -0,0 +1,26 @@ +# load rubygems and wirble +require 'rubygems' rescue nil +require 'wirble' + +# load wirble +Wirble.init +Wirble.colorize + +class Object + def methods_with_sort(filter = nil) + methods = methods_without_sort + if filter + filter = Regexp.new(filter.to_s, true) unless filter.is_a? Regexp + methods = methods.select { |method| method =~ filter } + end + methods.sort + end + alias_method :methods_without_sort, :methods + alias_method :methods, :methods_with_sort + + def instance_variables_with_sort + instance_variables_without_sort.sort + end + alias_method :instance_variables_without_sort, :instance_variables + alias_method :instance_variables, :instance_variables_with_sort +end