Module: Babl::Operators::Pin::DSL

Included in:
Template
Defined in:
lib/babl/operators/pin.rb

Instance Method Summary collapse

Instance Method Details

#goto_pin(ref) ⇒ Object



21
22
23
24
# File 'lib/babl/operators/pin.rb', line 21

def goto_pin(ref)
    check_pin_ref(ref)
    construct_node { |node| Nodes::GotoPin.new(node, ref) }.reset_key.reset_continue
end

#named_pin(ref) ⇒ Object



16
17
18
19
# File 'lib/babl/operators/pin.rb', line 16

def named_pin(ref)
    check_pin_ref(ref)
    construct_node { |node| Nodes::CreatePin.new(node, ref) }.reset_continue
end

#pin(navigation = unscoped, &block) ⇒ Object

Create a pin



11
12
13
14
# File 'lib/babl/operators/pin.rb', line 11

def pin(navigation = unscoped, &block)
    ref = Utils::Ref.new
    named_pin(ref).call(block[unscoped.goto_pin(ref).call(navigation)])
end