class Xembly::Xembler
Public Class Methods
new(dirs)
click to toggle source
Public Instance Methods
apply(xml)
click to toggle source
Apply them to the XML.
# File lib/xembly/xembler.rb, line 36 def apply(xml) dom = Nokogiri::XML(xml) cursor = [dom] @dirs.each do |dir| cursor = dir.exec(dom, cursor) Xembly.log.info "Applied: #{dir}" end Xembly.log.info "#{@dirs.length} directive(s) applied" dom end