Class: Yobi::TagOutcome

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

Overview

The outcome of one Yobi::Repository#tag call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution) ⇒ TagOutcome

:nodoc:

Parameters:

  • execution (execution)


51
52
53
# File 'lib/yobi/repository/tag.rb', line 51

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

Instance Attribute Details

#outputResticOutput (readonly)

The Yobi::ResticOutput backing this outcome.

Returns:



49
50
51
# File 'lib/yobi/repository/tag.rb', line 49

def output
  @output
end

Instance Method Details

#changesResticOutput::LazyList[TagChange]

One Yobi::TagChange per snapshot actually modified.



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

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

#pretty_print(q) ⇒ Object



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

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

#summaryTagSummary Also known as: report

The Yobi::TagSummary of Restic's own "summary" fields.

Returns:



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

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