summaryrefslogtreecommitdiff
path: root/lib/git/method_missing.py
diff options
context:
space:
mode:
authorMichael Trier <mtrier@gmail.com>2008-07-17 17:22:01 -0400
committerMichael Trier <mtrier@gmail.com>2008-07-17 17:22:01 -0400
commitc04c60f12d3684ecf961509d1b8db895e6f9aac0 (patch)
tree464108d7ba000759bb0b75523cde6d0125d1d6d8 /lib/git/method_missing.py
parent564db4f20bd7189a50a12d612d56ed6391081e83 (diff)
downloadgitpython-c04c60f12d3684ecf961509d1b8db895e6f9aac0.tar.gz
Removed method_missing since it was only used in one place.
Diffstat (limited to 'lib/git/method_missing.py')
-rw-r--r--lib/git/method_missing.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/git/method_missing.py b/lib/git/method_missing.py
deleted file mode 100644
index 250fcc6d..00000000
--- a/lib/git/method_missing.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# method_missing.py
-# Copyright (C) 2008 Michael Trier (mtrier@gmail.com) and contributors
-# Portions derived from http://blog.iffy.us/?p=43
-#
-# This module is part of GitPython and is released under
-# the BSD License: http://www.opensource.org/licenses/bsd-license.php
-
-class MethodMissingMixin(object):
- """
- A Mixin' to implement the 'method_missing' Ruby-like protocol.
-
- Ideas were `taken from the following blog post
- <http://blog.iffy.us/?p=43>`_
- """
- def __getattr__(self, attr):
- class MethodMissing(object):
- def __init__(self, wrapped, method):
- self.__wrapped__ = wrapped
- self.__method__ = method
- def __call__(self, *args, **kwargs):
- return self.__wrapped__.method_missing(self.__method__, *args, **kwargs)
- return MethodMissing(self, attr)
-
- def method_missing(self, *args, **kwargs):
- """ This method should be overridden in the derived class. """
- raise NotImplementedError(str(self.__wrapped__) + " 'method_missing' method has not been implemented.")