# File lib/rule_engine.rb, line 88 def begin_rules # if it is true or :finished, see end_rules & method_added if @__drp__defining_rules raise DRPError, 'begin rules may only be called once' else @__drp__rules = {} @__drp__defining_rules = true @__drp__weights = [] @__drp__max__depths = [] # NB max_depth should come first here in case user changes # the default to some weight which needs to know the max_depth max_depth DEFAULT[:max_depth] weight DEFAULT[:weight] end end