Skip to content

Instantly share code, notes, and snippets.

@reu
Created July 14, 2010 20:51
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 reu/476051 to your computer and use it in GitHub Desktop.
Save reu/476051 to your computer and use it in GitHub Desktop.
1.upto 500 do
Class.new do
1.upto 1000 do |method_number|
method_name = "method_#{method_number}"
instance_eval "# Hi I am a comment for #{method_name}"
attr_accessor method_name.to_sym
end
["click", "mousedown", "mouseenter", "mouseleave", "mouseout", "mouseover", "mouseup"].each do |event|
define_method event.to_sym do
"Hi I am on #{event}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment