Class: Pakyow::Presenter::SignificantNode Private
- Inherits:
-
Object
- Object
- Pakyow::Presenter::SignificantNode
- Defined in:
- lib/pakyow/presenter/significant_nodes.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
BindingNode, BindingWithinNode, BodyNode, ComponentNode, ContainerNode, EndpointActionNode, EndpointNode, FieldNode, FormNode, HTMLNode, HeadNode, LabelNode, MetaNode, MethodOverrideNode, ModeNode, MultipartBinding, OptgroupNode, OptionNode, PartialNode, PrototypeNode, TemplateNode, TitleNode, WithinBindingNode, WithinFormNode
Class Method Summary collapse
- .binding_within?(node) ⇒ Boolean private
- .within_binding?(node) ⇒ Boolean private
- .within_form?(node) ⇒ Boolean private
Class Method Details
.binding_within?(node) ⇒ Boolean
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.
49 50 51 52 53 |
# 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) ⇒ Boolean
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.
39 40 41 42 43 44 45 46 47 |
# 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) ⇒ Boolean
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.
55 56 57 58 59 60 61 62 63 |
# 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 |