Class: Mathtype::Converter
- Inherits:
-
Object
- Object
- Mathtype::Converter
- Defined in:
- lib/ruby_docx/elements/ole_object.rb
Instance Method Summary collapse
-
#initialize(equation) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
#initialize(equation) ⇒ Converter
Returns a new instance of Converter.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby_docx/elements/ole_object.rb', line 8 def initialize(equation) ole = Ole::Storage.open(equation) eq = ole.file.read("Equation Native")[28..-1] data = Mathtype::Equation.read(eq).snapshot @builder = Nokogiri::XML::Builder.new do |xml| @xml = xml xml.root do process(object: data) end end end |