oneup (owner)

Revisions

gist: 210915 Download_button fork
public
Description:
rails styles find_by_* automethods
Public Clone URL: git://gist.github.com/210915.git
Embed All Files: show embed
coldec.rb #
1
2
3
4
5
6
7
8
9
10
# make on_collision_with()
 
 
def self.register_collision_classes
  result = instance_methods.grep(/^#{COLLISION_HANDLER_PREFIX}/).map do |method_name|
    name_of_handled = method_name[/^#{COLLISION_HANDLER_PREFIX}_?(.*)/,1]
    Game.referee.track(self.underscore_name,name_of_handled.empty? ? :any : name_of_handled)
  end
end