Skip to content

Instantly share code, notes, and snippets.

@jgagner
Created August 26, 2010 23:55
Show Gist options
  • Select an option

  • Save jgagner/552495 to your computer and use it in GitHub Desktop.

Select an option

Save jgagner/552495 to your computer and use it in GitHub Desktop.

Revisions

  1. jgagner created this gist Aug 26, 2010.
    18 changes: 18 additions & 0 deletions LOL.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #mostly pseudo-code
    #LOLOLOL

    class Module
    alias_method :old_method_missing, :method_missing
    def method_missing(methId)
    methods = methId.split("_")
    tmp = self
    while methods.size > 0
    my_meth = methods.pop
    if tmp.respond_to?(my_meth)
    tmp = tmp.send(my_meth)
    else
    old_method_missing(methId)
    end
    end
    end
    end