Class: Plurimath::Math::Formula::Mstyle
- Inherits:
-
Formula
- Object
- Formula
- Plurimath::Math::Formula::Mstyle
- Defined in:
- lib/plurimath/math/formula/mstyle.rb
Instance Method Summary collapse
- #displaystyle=(value) ⇒ Object
- #is_mstyle? ⇒ Boolean
- #omml_content(display_style, options:) ⇒ Object
Instance Method Details
#displaystyle=(value) ⇒ Object
7 8 9 |
# File 'lib/plurimath/math/formula/mstyle.rb', line 7 def displaystyle=(value) @displaystyle = boolean_display_style(value) end |
#is_mstyle? ⇒ Boolean
11 12 13 |
# File 'lib/plurimath/math/formula/mstyle.rb', line 11 def is_mstyle? true end |
#omml_content(display_style, options:) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/plurimath/math/formula/mstyle.rb', line 15 def omml_content(display_style, options:) # Use Mstyle's own @displaystyle, not the passed-in display_style effective_display = @displaystyle.nil? ? display_style : @displaystyle value&.map do |val| val.insert_t_tag(effective_display, options: ) end end |