Method: Nokogiri::XML::NodeSet#each

Defined in:
lib/nokogiri/xml/node_set.rb

#each(&block) ⇒ Object

Iterate over each node, yielding to block



200
201
202
203
204
205
206
207
# File 'lib/nokogiri/xml/node_set.rb', line 200

def each(&block)
  return to_enum unless block_given?

  0.upto(length - 1) do |x|
    yield self[x]
  end
  self
end