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
- #categories ⇒ Object
- #external_links(*selectors, &block) ⇒ Object
- #headings(level = nil) ⇒ Object
- #images(*selectors, &block) ⇒ Object
- #infoboxes(*selectors, &block) ⇒ Object
- #lists(*selectors, &block) ⇒ Object
- #paragraphs(*selectors, &block) ⇒ Object
- #tables(*selectors, &block) ⇒ Object
- #templates(*selectors, &block) ⇒ Object
- #wikilinks(namespace = '') ⇒ Object
Instance Method Details
#categories ⇒ Object
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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 |
#external_links(*selectors, &block) ⇒ Object
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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 |
#wikilinks(namespace = '') ⇒ Object
158 159 160 161 162 163 164 |
# File 'lib/infoboxer/navigation/shortcuts.rb', line 158 %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 |