Skip to content
Browse files

Add :apply alias for :do.

  • Loading branch information...
1 parent 38c4b91 commit 200a5ae9458e9b0da0163183d0a83e997834caf2 @louismullie committed Oct 13, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/treat/proxies/proxy.rb
View
5 lib/treat/proxies/proxy.rb
@@ -9,8 +9,9 @@ module Proxy
# Build the entity corresponding to the proxied
# object and send the method call to the entity.
def method_missing(sym, *args, &block)
- if sym == :do || Treat::Workers::Category.lookup(sym)
- to_entity.send(sym, *args)
+ if [:do, :apply].include?(sym) ||
+ Treat::Workers::Category.lookup(sym)
+ to_entity.send(sym, *args)
else
super(sym, *args, &block)
end

0 comments on commit 200a5ae

Please sign in to comment.
Something went wrong with that request. Please try again.