lib/wortsammler/class.Traceable.rb in wortsammler-0.0.9 vs lib/wortsammler/class.Traceable.rb in wortsammler-1.0.0

- old
+ new

@@ -41,10 +41,12 @@ # @param traceable [Traceable] The traceable which shall be added # * first # * second # # @return [type] [description] + # + # def add(traceable) #TOOD: check traceable #TODO: check if append can be optimized @traces[traceable.id] = [@traces[traceable.id], traceable].flatten.compact @@ -282,18 +284,18 @@ # # this is used to beautify an nokigiri document # @param [Nokogiri::XML::Document] doc - the document # @return [Nokogiri::XML::Document] the beautified document def xp(doc) - xsl =<<XSL + xsl =<<-XSL <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:copy-of select="."/> </xsl:template> </xsl:stylesheet> -XSL + XSL xslt = Nokogiri::XSLT(xsl) out = xslt.transform(doc)