Make before_method work more like method_missing

This commit is contained in:
Tobias Lütke
2008-05-08 17:22:07 -04:00
parent 63f9a05223
commit ed75a6d948
2 changed files with 15 additions and 6 deletions
+6 -4
View File
@@ -28,10 +28,12 @@ module Liquid
end
# called by liquid to invoke a drop
def invoke_drop(method)
result = before_method(method)
result ||= send(method.to_sym) if self.class.public_instance_methods.include?(method.to_s)
result
def invoke_drop(method)
if self.class.public_instance_methods.include?(method.to_s)
send(method.to_sym)
else
before_method(method)
end
end
def has_key?(name)