summary refs log tree commit diff stats
path: root/ranger/core/shared.py
blob: 177ba15db0e55a79c7dd1482823dfe98e16f1a35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.

"""Shared objects contain singletons for shared use."""

from ranger.ext.lazy_property import lazy_property

class FileManagerAware(object):
    """Subclass this to gain access to the global "FM" object."""
    @staticmethod
    def _setup(fm):
        FileManagerAware.fm = fm

class SettingsAware(object):
    """Subclass this to gain access to the global "SettingObject" object."""
    @staticmethod
    def _setup(settings):
        SettingsAware.settings = settings