Class: Yobi::TagOutcome

Inherits:
Object
  • Object
show all
Defined in:
lib/yobi/repository/tag.rb,
sig/yobi.rbs

Overview

The outcome of one Repository#tag call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution) ⇒ TagOutcome

Returns a new instance of TagOutcome.

Parameters:

  • execution (execution)


57
58
59
# File 'lib/yobi/repository/tag.rb', line 57

def initialize(execution)
  @output = execution[:output]
end

Instance Attribute Details

#outputYobi::ResticOutput (readonly)

Returns:



54
55
56
# File 'lib/yobi/repository/tag.rb', line 54

def output
  @output
end

Instance Method Details

#changesEnumerable<Yobi::TagChange>

Returns one per snapshot actually modified.

Returns:



68
69
70
# File 'lib/yobi/repository/tag.rb', line 68

def changes
  @changes ||= output.messages("changed")
end

#pretty_print(q) ⇒ void

This method returns an undefined value.



73
74
75
76
77
78
# File 'lib/yobi/repository/tag.rb', line 73

def pretty_print(q)
  q.object_group(self) do
    q.breakable
    q.pp summary
  end
end

#summaryYobi::TagSummary Also known as: report

Returns Restic's own "summary" fields ("changed_snapshots").

Returns:



62
63
64
# File 'lib/yobi/repository/tag.rb', line 62

def summary
  @summary ||= output.messages("summary").first || TagSummary.new({})
end