class Pakyow::Presenter::SignificantNode

@api private

Public Class Methods

binding_within?(node) click to toggle source
# File lib/pakyow/presenter/significant_nodes.rb, line 49
def self.binding_within?(node)
  node.children.any? { |child|
    BindingNode.significant?(child) || binding_within?(child)
  }
end
within_binding?(node) click to toggle source
# File lib/pakyow/presenter/significant_nodes.rb, line 39
def self.within_binding?(node)
  if BindingNode.significant?(node)
    true
  elsif !node.is_a?(Oga::XML::Document)
    within_binding?(node.parent)
  else
    false
  end
end
within_form?(node) click to toggle source
# File lib/pakyow/presenter/significant_nodes.rb, line 55
def self.within_form?(node)
  if FormNode.significant?(node)
    true
  elsif !node.is_a?(Oga::XML::Document)
    within_form?(node.parent)
  else
    false
  end
end