class Stepmod::Utils::SmrlResourceConverter
Public Class Methods
convert(input, options = {})
click to toggle source
# File lib/stepmod/utils/smrl_resource_converter.rb, line 49 def self.convert(input, options = {}) root = case input when String Nokogiri::XML(input).root when Nokogiri::XML::Document input.root when Nokogiri::XML::Node input end root || (return "") ReverseAdoc.config.with(options) do result = ReverseAdoc::Converters.lookup(root.name).convert(root) Stepmod::Utils::Cleaner.new.tidy(result) end end