Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
--type-add | |||
xml=builder | |||
#ruby=haml | |||
#html=erb | |||
--smart-case | |||
--nosql | |||
--ignore-dir=wp-content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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 |