Class: Yobi::ForgetGroups
- Inherits:
-
Object
- Object
- Yobi::ForgetGroups
- Includes:
- Enumerable, Enumerable[ForgetGroup]
- Defined in:
- lib/yobi/repository/forget.rb,
sig/yobi.rbs
Overview
The outcome of one Repository#forget call.
Instance Attribute Summary collapse
- #exit_code ⇒ Integer readonly
- #output ⇒ Yobi::ResticOutput readonly
Instance Method Summary collapse
-
#each {|group| ... } ⇒ Enumerator
If no block is given.
-
#initialize(exit_code, output) ⇒ ForgetGroups
constructor
A new instance of ForgetGroups.
- #partial? ⇒ Boolean
- #success? ⇒ Boolean
Constructor Details
#initialize(exit_code, output) ⇒ ForgetGroups
Returns a new instance of ForgetGroups.
88 89 90 91 |
# File 'lib/yobi/repository/forget.rb', line 88 def initialize(exit_code, output) @exit_code = exit_code @output = output end |
Instance Attribute Details
#exit_code ⇒ Integer (readonly)
82 83 84 |
# File 'lib/yobi/repository/forget.rb', line 82 def exit_code @exit_code end |
#output ⇒ Yobi::ResticOutput (readonly)
84 85 86 |
# File 'lib/yobi/repository/forget.rb', line 84 def output @output end |
Instance Method Details
#each ⇒ void #each ⇒ Enumerator[ForgetGroup, void]
Returns if no block is given.
95 96 97 98 99 |
# File 'lib/yobi/repository/forget.rb', line 95 def each(&block) return enum_for(:each) unless block_given? groups.each(&block) end |
#partial? ⇒ Boolean
107 108 109 |
# File 'lib/yobi/repository/forget.rb', line 107 def partial? exit_code == 3 end |
#success? ⇒ Boolean
102 103 104 |
# File 'lib/yobi/repository/forget.rb', line 102 def success? exit_code.zero? end |