class Nokogiri::XML::NodeSet
Public Instance Methods
hchildren()
click to toggle source
# File lib/hmisc/hhtmlnode.rb, line 3 def hchildren result = [] self.children.each do |node| result << node if(node.name != "text") end return result end
to_a_of_h()
click to toggle source
# File lib/hmisc/hhtmlnode.rb, line 15 def to_a_of_h # array of hash return self.map { |node| node.to_h.symbolize_keys } # The follow instruction is replaced by that above items = [] self.each { |node| items << node.to_h.symbolize_keys } return items end