Class: Filesystem
- Inherits:
-
Object
- Object
- Filesystem
- Defined in:
- lib/zfs-snapshot.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#period ⇒ Object
readonly
Returns the value of attribute period.
-
#recursive ⇒ Object
readonly
Returns the value of attribute recursive.
Instance Method Summary collapse
-
#initialize(name, period, recurse) ⇒ Filesystem
constructor
A new instance of Filesystem.
- #take_snapshot ⇒ Object
Constructor Details
#initialize(name, period, recurse) ⇒ Filesystem
Returns a new instance of Filesystem.
65 66 67 68 69 |
# File 'lib/zfs-snapshot.rb', line 65 def initialize(name, period, recurse) @name = name @period = period @recursive = recurse end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
63 64 65 |
# File 'lib/zfs-snapshot.rb', line 63 def name @name end |
#period ⇒ Object (readonly)
Returns the value of attribute period.
63 64 65 |
# File 'lib/zfs-snapshot.rb', line 63 def period @period end |
#recursive ⇒ Object (readonly)
Returns the value of attribute recursive.
63 64 65 |
# File 'lib/zfs-snapshot.rb', line 63 def recursive @recursive end |
Instance Method Details
#take_snapshot ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/zfs-snapshot.rb', line 71 def take_snapshot if existing_snapshot? p "found a snapshot" remove_snapshot end create_snapshot end |