Class: Stepmod::Utils::SmrlResourceConverter
- Inherits:
-
Object
- Object
- Stepmod::Utils::SmrlResourceConverter
- Defined in:
- lib/stepmod/utils/smrl_resource_converter.rb
Class Method Summary collapse
Class Method Details
.convert(input, options = {}) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/stepmod/utils/smrl_resource_converter.rb', line 42 def self.convert(input, = {}) root = case input when String Nokogiri::XML(input).root when Nokogiri::XML::Document input.root when Nokogiri::XML::Node input end root || (return "") Coradoc::Input::HTML.config.with() do result = Coradoc::Input::HTML::Converters.lookup(root.name).convert(root, ) Stepmod::Utils::Cleaner.new.tidy(result) end end |