Created
February 19, 2012 16:25
-
-
Save ender672/1864519 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/nokogiri/xml/node_set.rb b/lib/nokogiri/xml/node_set.rb | |
index 37b3848..149e90e 100644 | |
--- a/lib/nokogiri/xml/node_set.rb | |
+++ b/lib/nokogiri/xml/node_set.rb | |
@@ -240,6 +240,14 @@ module Nokogiri | |
end | |
end | |
+ def map | |
+ a = [] | |
+ length.times do |x| | |
+ a << yield(self[x]) | |
+ end | |
+ a | |
+ end | |
+ | |
### | |
# Get the inner text of all contained Node objects | |
def inner_text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment