Module: Infoboxer::Navigation::Shortcuts::Nodes

Included in:
Tree::Nodes
Defined in:
lib/infoboxer/navigation/shortcuts.rb

Overview

Companion module of Shortcuts::Node, defining all the same methods for Tree::Nodes so you can use them uniformely on single node or list. See there for details.

Instance Method Summary collapse

Instance Method Details

#categoriesObject



156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end


156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end

#headings(level = nil) ⇒ Object



156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end

#images(*selectors, &block) ⇒ Object



156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end

#infoboxes(*selectors, &block) ⇒ Object



156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end

#lists(*selectors, &block) ⇒ Object



156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end

#paragraphs(*selectors, &block) ⇒ Object



156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end

#tables(*selectors, &block) ⇒ Object



156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end

#templates(*selectors, &block) ⇒ Object



156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end


156
157
158
159
160
161
162
# File 'lib/infoboxer/navigation/shortcuts.rb', line 156

%i[wikilinks headings paragraphs external_links images
 templates tables lists infoboxes infobox categories]
.each do |m|
  define_method(m) do |*args|
    make_nodes(map { |n| n.send(m, *args) })
  end
end