# File lib/rule_engine.rb, line 281 def weight *args, &block bg, are_args = block_given?, args.size > 0 if bg && are_args raise ArgumentError, 'weight called with both arguments and a block', caller elsif bg @__drp__weights << Weights::ProcStaticWeight.factory(block) elsif are_args @__drp__weights << Weights::StaticWeight.factory(args) else raise ArgumentError, 'weight called with neither args nor block', caller end end