def build_root_recurrence_rule(expression) # :nodoc:
      return ::IceCube::Rule.minutely(expression.interval) if expression.minute.blank?
      return ::IceCube::Rule.hourly(expression.interval) if expression.hour.blank?
      unless nth_day?(expression.day_of_week)
        return ::IceCube::Rule.weekly(expression.interval) if expression.day_of_month.blank? && !expression.day_of_week.blank?
        return ::IceCube::Rule.daily(expression.interval) if expression.day_of_month.blank?
      end
      return ::IceCube::Rule.monthly(expression.interval) if expression.month.blank?

      ::IceCube::Rule.yearly(expression.interval)
    end
def build_root_recurrence_rule(expression) # :nodoc:
      return ::IceCube::Rule.minutely(expression.interval) if expression.minute.blank?
      return ::IceCube::Rule.hourly(expression.interval) if expression.hour.blank?
      unless nth_day?(expression.day_of_week)
        return ::IceCube::Rule.weekly(expression.interval) if expression.day_of_month.blank? && !expression.day_of_week.blank?
        return ::IceCube::Rule.daily(expression.interval) if expression.day_of_month.blank?
      end
      return ::IceCube::Rule.monthly(expression.interval) if expression.month.blank?

      ::IceCube::Rule.yearly(expression.interval)
    end
rubocop:disable Metrics/AbcSize
 rubocop:disable Metrics/CyclomaticComplexity
 rubocop:disable Metrics/PerceivedComplexity