#NEWLINE# def __init__( self , base_behavior , action , subject , conditions = None , **conditions_hash ) : #NEWLINE# #INDENT# self . base_behavior = base_behavior #NEWLINE# self . actions = listify ( action ) #NEWLINE# self . subjects = listify ( subject ) #NEWLINE# self . conditions = None #NEWLINE# if ( ( conditions is not None ) and ( len ( conditions_hash ) > 0 ) ) : #NEWLINE# #INDENT# raise TypeError ( 'cannot provide both a condition method and hash -- pick one' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( conditions is not None ) : #NEWLINE# #INDENT# self . conditions = conditions #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( conditions_hash ) > 0 ) : #NEWLINE# #INDENT# self . conditions = conditions_hash