Class: Yobi::Keys
- Inherits:
-
Object
- Object
- Yobi::Keys
- Includes:
- Enumerable, Enumerable[Key]
- Defined in:
- lib/yobi/repository/key.rb,
sig/yobi.rbs
Overview
Enumerable over every Key in one Repository#key_list call.
Instance Attribute Summary collapse
- #output ⇒ Yobi::ResticOutput readonly
Instance Method Summary collapse
-
#each {|key| ... } ⇒ Enumerator
If no block is given.
-
#initialize(output) ⇒ Keys
constructor
A new instance of Keys.
Constructor Details
#initialize(output) ⇒ Keys
Returns a new instance of Keys.
108 109 110 |
# File 'lib/yobi/repository/key.rb', line 108 def initialize(output) @output = output end |
Instance Attribute Details
#output ⇒ Yobi::ResticOutput (readonly)
105 106 107 |
# File 'lib/yobi/repository/key.rb', line 105 def output @output end |
Instance Method Details
#each ⇒ void #each ⇒ Enumerator[Key, void]
Returns if no block is given.
114 115 116 117 118 |
# File 'lib/yobi/repository/key.rb', line 114 def each(&block) return enum_for(:each) unless block_given? keys.each(&block) end |