Module: Babl::Operators::Pin::DSL
- Included in:
- Template
- Defined in:
- lib/babl/operators/pin.rb
Instance Method Summary collapse
-
#pin(navigation = nil, &block) ⇒ Object
Create a pin.
Instance Method Details
#pin(navigation = nil, &block) ⇒ Object
Create a pin
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/babl/operators/pin.rb', line 11 def pin( = nil, &block) return pin { |p| block[p.call()] } if ref = Utils::Ref.new referenced_scope = unscoped.construct_node(key: nil, continue: nil) { |node| Nodes::GotoPin.new(node, ref) } construct_node(continue: nil) { |node| Nodes::CreatePin.new(node, ref) } .call(block[referenced_scope]) end |