math_ml 0.13 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,27 +6,28 @@
6
6
  # You can redistribute it and/or modify it under GPL2.
7
7
  #
8
8
 
9
- require "math_ml"
9
+ require 'math_ml'
10
10
 
11
11
  module MathML
12
- module String
13
- @@mathml_latex_parser = nil
14
- def self.mathml_latex_parser
15
- @@mathml_latex_parser = MathML::LaTeX::Parser.new unless @@mathml_latex_parser
16
- @@mathml_latex_parser
17
- end
12
+ module String
13
+ @@mathml_latex_parser = nil
14
+ def self.mathml_latex_parser
15
+ @@mathml_latex_parser ||= MathML::LaTeX::Parser.new
16
+ @@mathml_latex_parser
17
+ end
18
18
 
19
- def self.mathml_latex_parser=(mlp)
20
- raise TypeError unless mlp.is_a?(MathML::LaTeX::Parser) || mlp==nil
21
- @@mathml_latex_parser = mlp
22
- end
19
+ def self.mathml_latex_parser=(mlp)
20
+ raise TypeError unless mlp.is_a?(MathML::LaTeX::Parser) || mlp.nil?
23
21
 
24
- def to_mathml(displaystyle=false)
25
- MathML::String.mathml_latex_parser.parse(self, displaystyle)
26
- end
27
- end
22
+ @@mathml_latex_parser = mlp
23
+ end
24
+
25
+ def to_mathml(displaystyle = false)
26
+ MathML::String.mathml_latex_parser.parse(self, displaystyle)
27
+ end
28
+ end
28
29
  end
29
30
 
30
31
  class String
31
- include MathML::String
32
+ include MathML::String
32
33
  end