Sha256: 5c9310a35cc770c4a978db4e2f6f2b76c09afa63b56a487eb4f5e466aaabb041
Contents?: true
Size: 988 Bytes
Versions: 3
Compression:
Stored size: 988 Bytes
Contents
# frozen_string_literal: true module Plurimath module Math class Number < Core attr_accessor :value def initialize(value) @value = value.is_a?(Parslet::Slice) ? value.to_s : value end def ==(object) object.respond_to?(:value) && object.value == value end def to_asciimath value end def to_mathml_without_math_tag Utility.ox_element("mn") << value end def to_latex value end def to_html value end def to_omml_without_math_tag(_) [t_tag] end def insert_t_tag(_) [ (Utility.ox_element("r", namespace: "m") << t_tag), ] end def font_style_t_tag(_) t_tag end def t_tag Utility.ox_element("t", namespace: "m") << value end def nary_attr_value value end def validate_function_formula false end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
plurimath-0.7.2 | lib/plurimath/math/number.rb |
plurimath-0.7.1 | lib/plurimath/math/number.rb |
plurimath-0.7.0 | lib/plurimath/math/number.rb |