Building rule object.