Class: Yobi::Snapshots
- Inherits:
-
Object
- Object
- Yobi::Snapshots
- Includes:
- Enumerable, Enumerable[Snapshot]
- Defined in:
- lib/yobi/repository/snapshots.rb,
sig/yobi.rbs
Overview
Enumerable over every Snapshot in one Repository#snapshots call.
Instance Attribute Summary collapse
- #output ⇒ Yobi::ResticOutput readonly
Instance Method Summary collapse
-
#each {|snapshot| ... } ⇒ Enumerator
If no block is given.
-
#initialize(output) ⇒ Snapshots
constructor
A new instance of Snapshots.
Constructor Details
#initialize(output) ⇒ Snapshots
Returns a new instance of Snapshots.
38 39 40 |
# File 'lib/yobi/repository/snapshots.rb', line 38 def initialize(output) @output = output end |
Instance Attribute Details
#output ⇒ Yobi::ResticOutput (readonly)
35 36 37 |
# File 'lib/yobi/repository/snapshots.rb', line 35 def output @output end |
Instance Method Details
#each ⇒ void #each ⇒ Enumerator[Snapshot, void]
Returns if no block is given.
44 45 46 47 48 |
# File 'lib/yobi/repository/snapshots.rb', line 44 def each(&block) return enum_for(:each) unless block_given? entries.each(&block) end |