Method: Pakyow::Presenter::View#each_binding

Defined in:
lib/pakyow/presenter/view.rb

#each_binding(name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/pakyow/presenter/view.rb', line 495

def each_binding(name)
  return enum_for(:each_binding, name) unless block_given?

  each_binding_scope do |node|
    if node.label(:channeled_binding) == name
      yield node
    end
  end

  each_binding_prop do |node|
    if (node.significant?(:multipart_binding) && node.label(:binding_prop) == name) || (!node.significant?(:multipart_binding) && node.label(:binding) == name)
      yield node
    end
  end
end