Class: OsCtl::Lib::Zfs::Snapshot
- Inherits:
-
Object
- Object
- OsCtl::Lib::Zfs::Snapshot
- Defined in:
- lib/libosctl/zfs/snapshot.rb
Overview
Class representing a single ZFS snapshot
Instance Attribute Summary collapse
- #dataset ⇒ Zfs::Dataset readonly
- #properties ⇒ Hash readonly
Instance Method Summary collapse
-
#initialize(dataset, name) ⇒ Snapshot
constructor
A new instance of Snapshot.
- #name ⇒ Object
- #snapshot ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(dataset, name) ⇒ Snapshot
Returns a new instance of Snapshot.
12 13 14 15 16 |
# File 'lib/libosctl/zfs/snapshot.rb', line 12 def initialize(dataset, name) @dataset = dataset @name = name @properties = {} end |
Instance Attribute Details
#dataset ⇒ Zfs::Dataset (readonly)
5 6 7 |
# File 'lib/libosctl/zfs/snapshot.rb', line 5 def dataset @dataset end |
#properties ⇒ Hash (readonly)
8 9 10 |
# File 'lib/libosctl/zfs/snapshot.rb', line 8 def properties @properties end |
Instance Method Details
#name ⇒ Object
18 19 20 |
# File 'lib/libosctl/zfs/snapshot.rb', line 18 def name to_s end |
#snapshot ⇒ Object
22 23 24 |
# File 'lib/libosctl/zfs/snapshot.rb', line 22 def snapshot @name end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/libosctl/zfs/snapshot.rb', line 26 def to_s "#{dataset}@#{snapshot}" end |