Class: Pakyow::Presenter::ComponentNode Private

Inherits:
SignificantNode show all
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.

Class Method Summary collapse

Methods inherited from SignificantNode

binding_within?, within_binding?, within_form?

Class Method Details

.decorate(node) ⇒ 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.



165
166
167
168
169
# File 'lib/pakyow/presenter/significant_nodes.rb', line 165

def self.decorate(node)
  node.set_label(:components, node.attributes[:"data-ui"].split(";").map { |component_string|
    Component.parse(component_string)
  })
end

.significant?(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.

Returns:

  • (Boolean)


161
162
163
# File 'lib/pakyow/presenter/significant_nodes.rb', line 161

def self.significant?(node)
  node.is_a?(Oga::XML::Element) && node.attribute(:ui)
end