Class: Bundler::Molinillo::DependencyGraph::SetPayload
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Action
|
|
Instance Chain:
self,
Action
|
|
Inherits: |
Bundler::Molinillo::DependencyGraph::Action
|
Defined in: | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb |
Overview
Action
- .action_name ⇒ Symbol
-
#down(graph) ⇒ Void
Reverses the action on the given graph.
-
#up(graph) ⇒ Void
Performs the action on the given graph.
SetPayload
- #name ⇒ String readonly
-
.new(name, payload) ⇒ SetPayload
constructor
Initialize an action to add set the payload for a vertex in a dependency graph.
- #payload ⇒ Object readonly
Class Method Summary
Action
- Inherited
Instance Attribute Summary
Instance Method Summary
Action
- Inherited
Constructor Details
.new(name, payload) ⇒ SetPayload
Initialize an action to add set the payload for a vertex in a dependency graph
Class Method Details
.action_name ⇒ Symbol
# File 'lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb', line 12
def self.action_name :set_payload end
Instance Attribute Details
#name ⇒ String
(readonly)
# File 'lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb', line 31
attr_reader :name
#payload ⇒ Object
(readonly)
# File 'lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb', line 34
attr_reader :payload
Instance Method Details
#down(graph) ⇒ Void
Reverses the action on the given graph.
# File 'lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb', line 24
def down(graph) graph.vertex_named(name).payload = @old_payload end
#up(graph) ⇒ Void
Performs the action on the given graph.
# File 'lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb', line 17
def up(graph) vertex = graph.vertex_named(name) @old_payload = vertex.payload vertex.payload = payload end