Skip to content

Instantly share code, notes, and snippets.

@banister
Created December 10, 2008 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banister/34310 to your computer and use it in GitHub Desktop.
Save banister/34310 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'object2module'
class Object
include Object2module
def gen_extend(*objs)
objs.each_with_index { |v, i|
if !v.instance_of?(Module) then
objs[i] = v.object2module
end
# extend(*objs)
return objs
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment