"""Package for a source of context values with fixtures."""

from asteex.abstract.context import Source
from asteex.core.context.source.strategy import Strategy


class FixtureSource(Source):
    """Class for a source with a fixture."""

    def __init__(self, fixture, strategy=Strategy.EVALUATE_FIXTURE.value):
        super().__init__(strategy=str(strategy))
        self.__fixture = fixture

    def get_fixture(self):
        """Get fixture to produce a value.

        :returns: :class:`Fixture <asteex.core.fixture.abstract.Fixture>`.
        """
        return self.__fixture
