# Path: therapist/collection.py
# class Collection(object):
#     """A generic iterable set of objects."""
# 
#     class Meta:
#         pass
# 
#     def __init__(self, objects=None):
#         self._objects = []
# 
#         if objects:
#             for obj in objects:
#                 self.append(obj)
# 
#     def __iter__(self):
#         return iter(self._objects)
# 
#     def __getitem__(self, item):
#         return self._objects[item]
# 
#     def __str__(self):  # pragma: no cover
#         return str(self._objects)
# 
#     def __repr__(self):  # pragma: no cover
#         return "<{}>".format(self.__class__.__name__)
# 
#     def __bool__(self):
#         return bool(self._objects)
# 
#     __nonzero__ = __bool__
# 
#     @property
#     def objects(self):
#         return self._objects
# 
#     def append(self, v):
#         object_class = getattr(self.Meta, "object_class", object)
# 
#         if not isinstance(v, object_class):
#             raise TypeError("Expected an instance of `{}`.".format(object_class.__name__))
# 
#         self._objects.append(v)
# 
# Path: therapist/exc.py
# class Error(Exception):
#     def __init__(self, message=None, *args, **kwargs):
#         self.message = message
#         super(Error, self).__init__(*args, **kwargs)


from therapist.collection import Collection
from therapist.exc import Error
class Shortcut(object):
    def __init__(self, name, **kwargs):
        self.name = name
        self.extends = kwargs.pop("extends", None)

        self._options = None
        self.options = kwargs.pop("options", None)

        self._flags = None
        self.flags = kwargs.pop("flags", None)

    @property
    def options(self):
        return self._options

    @options.setter
    def options(self, value):
        if value is None:
            self._options = {}
        elif isinstance(value, dict):
            self._options = {}
            for key in value:
                self._options[key.replace("-", "_")] = value[key]
        else:
            self.options = {value.replace("-", "_"): True}

    @property
    def flags(self):
        return self._flags


# Path: therapist/collection.py
# class Collection(object):
#     """A generic iterable set of objects."""
# 
#     class Meta:
#         pass
# 
#     def __init__(self, objects=None):
#         self._objects = []
# 
#         if objects:
#             for obj in objects:
#                 self.append(obj)
# 
#     def __iter__(self):
#         return iter(self._objects)
# 
#     def __getitem__(self, item):
#         return self._objects[item]
# 
#     def __str__(self):  # pragma: no cover
#         return str(self._objects)
# 
#     def __repr__(self):  # pragma: no cover
#         return "<{}>".format(self.__class__.__name__)
# 
#     def __bool__(self):
#         return bool(self._objects)
# 
#     __nonzero__ = __bool__
# 
#     @property
#     def objects(self):
#         return self._objects
# 
#     def append(self, v):
#         object_class = getattr(self.Meta, "object_class", object)
# 
#         if not isinstance(v, object_class):
#             raise TypeError("Expected an instance of `{}`.".format(object_class.__name__))
# 
#         self._objects.append(v)
# 
# Path: therapist/exc.py
# class Error(Exception):
#     def __init__(self, message=None, *args, **kwargs):
#         self.message = message
#         super(Error, self).__init__(*args, **kwargs)


# Path: therapist/runner/shortcut.py
from therapist.collection import Collection
from therapist.exc import Error

class Shortcut(object):
    def __init__(self, name, **kwargs):
        self.name = name
        self.extends = kwargs.pop("extends", None)

        self._options = None
        self.options = kwargs.pop("options", None)

        self._flags = None
        self.flags = kwargs.pop("flags", None)

    @property
    def options(self):
        return self._options

    @options.setter
    def options(self, value):
        if value is None:
            self._options = {}
        elif isinstance(value, dict):
            self._options = {}
            for key in value:
                self._options[key.replace("-", "_")] = value[key]
        else:
            self.options = {value.replace("-", "_"): True}

    @property
    def flags(self):
        return self._flags


    @flags.setter