Class: OsCtl::Lib::Zfs::ObjsetStats::Tree
- Inherits:
-
Object
- Object
- OsCtl::Lib::Zfs::ObjsetStats::Tree
- Defined in:
- lib/libosctl/zfs/objset_stats/tree.rb
Instance Method Summary collapse
- #<<(pool_tree) ⇒ Object
- #[](dataset) ⇒ Object
-
#initialize ⇒ Tree
constructor
A new instance of Tree.
Constructor Details
#initialize ⇒ Tree
Returns a new instance of Tree.
3 4 5 |
# File 'lib/libosctl/zfs/objset_stats/tree.rb', line 3 def initialize @pool_trees = {} end |
Instance Method Details
#<<(pool_tree) ⇒ Object
8 9 10 |
# File 'lib/libosctl/zfs/objset_stats/tree.rb', line 8 def <<(pool_tree) @pool_trees[ pool_tree.pool ] = pool_tree end |
#[](dataset) ⇒ Object
13 14 15 16 |
# File 'lib/libosctl/zfs/objset_stats/tree.rb', line 13 def [](dataset) pool = dataset.split('/').first @pool_trees[pool][dataset] end |