MathML::Util

Constants

ESCAPES
INVALID_RE
EQNARRAY_RE
SINGLE_COMMAND_RE

Public Class Methods

collect_regexp(a) click to toggle source
    # File lib/math_ml/util.rb, line 31
31:         def self.collect_regexp(a)
32:                 if a
33:                         a = [a].flatten
34:                         a.size>0 ? Regexp.new(a.inject(""){|r, i| i.is_a?(Regexp) ? "#{r}#{i.to_s}|" : r}.chop) : INVALID_RE
35:                 else
36:                         INVALID_RE
37:                 end
38:         end
escapeXML(s, br=false) click to toggle source
    # File lib/math_ml/util.rb, line 22
22:         def self.escapeXML(s, br=false)
23:                 r = s.gsub(/[<>&"']/){|m| "&#{ESCAPES[m]};"}
24:                 br ? r.gsub(/\n/, "<br />\n") : r
25:         end

Public Instance Methods

collect_regexp(a) click to toggle source
    # File lib/math_ml/util.rb, line 40
40:         def collect_regexp(a)
41:                 MathML::Util.collect_regexp(a)
42:         end
escapeXML(s, br=false) click to toggle source
    # File lib/math_ml/util.rb, line 27
27:         def escapeXML(s, br=false)
28:                 MathML::Util.escapeXML(s, br)
29:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.