class Molinillo::DependencyGraph::SetPayload

:nodoc:
@see DependencyGraph#set_payload
@!visibility private

def self.name

(see Action.name)
def self.name
  :set_payload
end

def down(graph)

(see Action#down)
def down(graph)
  graph.vertex_named(name).payload = @old_payload
end

def initialize(name, payload)

Parameters:
  • payload (Object) -- the payload for the vertex
  • name (String) -- the name of the vertex
def initialize(name, payload)
  @name = name
  @payload = payload
end

def up(graph)

(see Action#up)
def up(graph)
  vertex = graph.vertex_named(name)
  @old_payload = vertex.payload
  vertex.payload = payload
end