Changeset 347 for elixir/trunk/elixir/statements.py
- Timestamp:
- 06/19/08 15:35:21 (4 years ago)
- Files:
-
- 1 modified
-
elixir/trunk/elixir/statements.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/elixir/statements.py
r311 r347 3 3 MUTATORS = '__elixir_mutators__' 4 4 5 class ClassMutator(object): 5 class ClassMutator(object): 6 6 ''' 7 7 DSL-style syntax 8 8 9 9 A ``ClassMutator`` object represents a DSL term. 10 10 ''' 11 11 12 12 def __init__(self, handler): 13 13 ''' … … 16 16 ''' 17 17 self.handler = handler 18 18 19 19 # called when a mutator (eg. "has_field(...)") is parsed 20 20 def __call__(self, *args, **kwargs): … … 28 28 def process(self, entity, *args, **kwargs): 29 29 ''' 30 Process one mutator. This version simply calls the handler callable, 30 Process one mutator. This version simply calls the handler callable, 31 31 but another mutator (sub)class could do more processing. 32 32 ''' … … 37 37 def process_mutators(entity): 38 38 ''' 39 Apply all mutators of the given entity. That is, loop over all mutators 39 Apply all mutators of the given entity. That is, loop over all mutators 40 40 in the class's mutator list and process them. 41 41 '''
