Method: Pakyow::Presenter::View#components
- Defined in:
- lib/pakyow/presenter/view.rb
#components(renderable: false) ⇒ 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.
Returns all components.
191 192 193 194 195 196 197 |
# File 'lib/pakyow/presenter/view.rb', line 191 def components(renderable: false) @object.each_significant_node_without_descending_into_type(:component, descend: true).select { |node| !renderable || node.label(:components).any? { |component| component[:renderable] } }.map { |node| View.from_object(node) } end |