def precision(object, pos_df, neg_df):
    """Calculate precision value of object's classification.

    object : Cond, Rule, or Ruleset
    """
    pos_covered = object.covers(pos_df)
    neg_covered = object.covers(neg_df)
    total_n_covered = len(pos_covered) + len(neg_covered)
    if total_n_covered == 0:
        return None
    else:
        return len(pos_covered) / total_n_covered
