bijoe: add a cubes iterator to engine

This commit is contained in:
Benjamin Dauvergne 2016-06-18 09:34:25 +02:00
parent 0b597edde7
commit cf539e86a7
1 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,11 @@ class Engine(object):
self.warehouse = warehouse
self.log = logging.getLogger(__name__)
@property
def cubes(self):
for cube in self.warehouse.cubes:
yield EngineCube(self, cube)
def __getitem__(self, name):
return EngineCube(self, self.warehouse.get_cube(name))