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



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

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


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

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

#headings(level = nil) ⇒ Object



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

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

#images(*selectors, &block) ⇒ Object



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

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

#infoboxes(*selectors, &block) ⇒ Object



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

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

#lists(*selectors, &block) ⇒ Object



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

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

#paragraphs(*selectors, &block) ⇒ Object



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

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

#tables(*selectors, &block) ⇒ Object



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

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

#templates(*selectors, &block) ⇒ Object



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

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


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

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