Class: Plurimath::Math::Function::Right

Inherits:
UnaryFunction show all
Defined in:
lib/plurimath/math/function/right.rb

Instance Attribute Summary

Attributes inherited from UnaryFunction

#parameter_one

Instance Method Summary collapse

Methods inherited from UnaryFunction

#==, #class_name, #initialize

Constructor Details

This class inherits a constructor from Plurimath::Math::Function::UnaryFunction

Instance Method Details

#to_asciimathObject



9
10
11
# File 'lib/plurimath/math/function/right.rb', line 9

def to_asciimath
  "right#{parameter_one}"
end

#to_htmlObject



25
26
27
# File 'lib/plurimath/math/function/right.rb', line 25

def to_html
  "<i>#{parameter_one}</i>"
end

#to_latexObject



29
30
31
# File 'lib/plurimath/math/function/right.rb', line 29

def to_latex
  "\\right #{Latex::Constants::LEFT_RIGHT_PARENTHESIS.invert[parameter_one] || '.'}"
end

#to_mathml_without_math_tagObject



13
14
15
16
17
# File 'lib/plurimath/math/function/right.rb', line 13

def to_mathml_without_math_tag
  mo = Utility.ox_element("mo")
  mo << right_paren if parameter_one
  mo
end

#to_omml_without_math_tagObject



19
20
21
22
23
# File 'lib/plurimath/math/function/right.rb', line 19

def to_omml_without_math_tag
  mt = Utility.ox_element("m:t")
  mt << parameter_one if parameter_one
  mt
end