Skip to content

Commit

Permalink
add check_method to Interface
Browse files Browse the repository at this point in the history
  • Loading branch information
plq committed Sep 2, 2014
1 parent 1ca6191 commit 3f103f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spyne/interface/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ def process_method(self, s, method):
% (method.name, s.__module__, s.__name__,
os.__module__, os.__name__))

def check_method(self, method):
"""Override this if you need to cherry-pick methods added to the interface
document."""

return True

def populate_interface(self, types=None):
"""Harvests the information stored in individual classes' _type_info
dictionaries. It starts from function definitions and includes only
Expand All @@ -283,6 +289,8 @@ def populate_interface(self, types=None):
method.aux = s.__aux__
if method.aux is not None:
method.aux.methods.append(_generate_method_id(s, method))
if not self.check_method(method):
continue

for cls in self.add_method(method):
self.add_class(cls)
Expand Down

0 comments on commit 3f103f6

Please sign in to comment.