Class: Plurimath::Math::Number
- Defined in:
- lib/plurimath/math/number.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #==(object) ⇒ Object
-
#initialize(value) ⇒ Number
constructor
A new instance of Number.
- #to_asciimath ⇒ Object
- #to_html ⇒ Object
- #to_latex ⇒ Object
- #to_mathml_without_math_tag ⇒ Object
- #to_omml_without_math_tag ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(value) ⇒ Number
Returns a new instance of Number.
8 9 10 |
# File 'lib/plurimath/math/number.rb', line 8 def initialize(value) @value = super end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/plurimath/math/number.rb', line 6 def value @value end |
Instance Method Details
#==(object) ⇒ Object
12 13 14 |
# File 'lib/plurimath/math/number.rb', line 12 def ==(object) object.value == value end |
#to_asciimath ⇒ Object
16 17 18 |
# File 'lib/plurimath/math/number.rb', line 16 def to_asciimath value end |
#to_html ⇒ Object
28 29 30 |
# File 'lib/plurimath/math/number.rb', line 28 def to_html value end |
#to_latex ⇒ Object
24 25 26 |
# File 'lib/plurimath/math/number.rb', line 24 def to_latex value end |
#to_mathml_without_math_tag ⇒ Object
20 21 22 |
# File 'lib/plurimath/math/number.rb', line 20 def to_mathml_without_math_tag Utility.ox_element("mn") << value end |
#to_omml_without_math_tag ⇒ Object
32 33 34 |
# File 'lib/plurimath/math/number.rb', line 32 def to_omml_without_math_tag Utility.ox_element("t", namespace: "m") << value end |