lib/hot_module/fragment.rb in hot_module-1.0.0.alpha10 vs lib/hot_module/fragment.rb in hot_module-1.0.0.alpha11

- old
+ new

@@ -8,12 +8,12 @@ @attribute_bindings = component.class.attribute_bindings.each do |attr_def| attr_def.method = component.method(attr_def.method_name) end end - # NOTE: for some reason, the Nokogiri traverse method yields node children first, then the - # parent node. That doesn't work for our case. We want to go strictly in source order. So this - # is our own implementation of that. + # NOTE: for some reason, the traverse method yields node children first, then the + # parent node. That doesn't work for our case. We want to go strictly in source order. + # So this is our own implementation of that. def traverse(node, &block) yield(node) node.children.each { |child| traverse(child, &block) } end