Method: Gem::Molinillo::DependencyGraph::Log#rewind_to

Defined in:
lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb

#rewind_to(graph, tag) ⇒ Void

Parameters:

  • graph (Graph)

    the graph to perform the action on

  • tag (Object)

    the tag to rewind to

Returns:

  • (Void)


103
104
105
106
107
108
109
# File 'lib/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb', line 103

def rewind_to(graph, tag)
  loop do
    action = pop!(graph)
    raise "No tag #{tag.inspect} found" unless action
    break if action.class.action_name == :tag && action.tag == tag
  end
end