# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# -----------------------------------------------------------------------------
"""Task equivalent to an if statement.
"""
from __future__ import (division, unicode_literals, print_function,
absolute_import)
from atom.api import (Unicode)
from ..validators import Feval
from ..base_tasks import ComplexTask
[docs]class ConditionalTask(ComplexTask):
"""Task calling its children only if a given condition is met.
"""
#: Condition to meet in order to perform the children tasks.
condition = Unicode().tag(pref=True, feval=Feval())