module Infoboxer::Navigation::Lookup::Nodes

This module provides implementations for all `lookup_*` methods of {Lookup::Node} for be used on nodes list. Note, that all those methods return flat list of results (so, if you have found several nodes, and then look for their siblings, you should not expect array of arrays – just one array of nodes).

See {Lookup::Node} for detailed lookups and selectors explanation.

Public Instance Methods

_find(selector) click to toggle source

Underscored version of {#find}.

# File lib/infoboxer/navigation/lookup.rb, line 196
def _find(selector)
  select { |n| n._matches?(selector) }
end
find(*selectors, &block) click to toggle source

Selects nodes of current list (and only it, no children checks), which are matching selectors.

# File lib/infoboxer/navigation/lookup.rb, line 202
def find(*selectors, &block)
  _find(Selector.new(*selectors, &block))
end