Class: Babl::Operators::Pin::CreatePinNode
- Inherits:
-
Object
- Object
- Babl::Operators::Pin::CreatePinNode
- Defined in:
- lib/babl/operators/pin.rb
Instance Method Summary collapse
- #dependencies ⇒ Object
- #documentation ⇒ Object
-
#initialize(node, ref) ⇒ CreatePinNode
constructor
A new instance of CreatePinNode.
- #pinned_dependencies ⇒ Object
- #render(ctx) ⇒ Object
Constructor Details
#initialize(node, ref) ⇒ CreatePinNode
Returns a new instance of CreatePinNode.
24 25 26 27 |
# File 'lib/babl/operators/pin.rb', line 24 def initialize(node, ref) @node = node @ref = ref end |
Instance Method Details
#dependencies ⇒ Object
37 38 39 |
# File 'lib/babl/operators/pin.rb', line 37 def dependencies Babl::Utils::Hash.deep_merge(node.dependencies, node.pinned_dependencies[ref] || {}) end |
#documentation ⇒ Object
33 34 35 |
# File 'lib/babl/operators/pin.rb', line 33 def documentation node.documentation end |
#pinned_dependencies ⇒ Object
41 42 43 |
# File 'lib/babl/operators/pin.rb', line 41 def pinned_dependencies node.pinned_dependencies.reject { |k, _v| k == ref } end |
#render(ctx) ⇒ Object
29 30 31 |
# File 'lib/babl/operators/pin.rb', line 29 def render(ctx) node.render(ctx.create_pin(ref)) end |