Sha256: 4917b077628f32bf8632dc73deceaf6eae3bc98b2268e12f91291176c866c707
Contents?: true
Size: 654 Bytes
Versions: 3
Compression:
Stored size: 654 Bytes
Contents
# frozen_string_literal: true require "plurimath/xml_engine" require "ox" Ox.default_options = { encoding: "UTF-8" } module Plurimath module XMLEngine class Ox class << self def new_element(name) ::Ox::Element.new(name) end def dump(data, **options) ::Ox.dump(data, **options) end def load(data) ::Ox.load(data, strip_namespace: true) end def is_xml_comment?(node) node.is_a?(::Ox::Comment) end def replace_nodes(root, nodes) root.nodes.replace(Array(nodes)) root end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
plurimath-0.8.2 | lib/plurimath/xml_engine/ox.rb |
plurimath-0.8.1 | lib/plurimath/xml_engine/ox.rb |
plurimath-0.8.0 | lib/plurimath/xml_engine/ox.rb |