#NEWLINE# def modifed_class( self , original_class , callback_cache ) : #NEWLINE# #INDENT# class_name = original_class . __name__ #NEWLINE# class_dict = dict ( ) #NEWLINE# class_dict [ 'callback_cache' ] = callback_cache #NEWLINE# def current_state_method( ) : #NEWLINE# #INDENT# def f( self ) : #NEWLINE# #INDENT# return self . aasm_state #NEWLINE# #UNINDENT# return property ( f ) #NEWLINE# #UNINDENT# class_dict [ 'current_state' ] = current_state_method ( ) #NEWLINE# class_dict . update ( original_class . __dict__ ) #NEWLINE# ( state_method_dict , initial_state ) = self . process_states ( original_class ) #NEWLINE# class_dict . update ( self . extra_class_members ( initial_state ) ) #NEWLINE# class_dict . update ( clazz ) #NEWLINE# event_method_dict = self . process_events ( original_class ) #NEWLINE# class_dict . update ( event_method_dict ) #NEWLINE# clazz = type ( class_name , original_class . __bases__ , class_dict ) #NEWLINE# return clazz