Sha256: 8dcf3069d2aeab84d12174da5e22a1b1cfd0ca5251777a5fc12db4f6db57d485
Contents?: true
Size: 379 Bytes
Versions: 7
Compression:
Stored size: 379 Bytes
Contents
require 'nokogiri' Nokogiri::XML::Node.class_eval do def add_node(name) add_child Nokogiri::XML::Node.new(name, document) end # FIXME: remove switch. where is #from used with nodes? def self.from(data) case data when Nokogiri::XML::Node data when Nokogiri::XML::Document data.root else Nokogiri::XML(data).root end end end
Version data entries
7 entries across 7 versions & 1 rubygems