Class: Plurimath::Math::Function::Td

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

Instance Attribute Summary

Attributes inherited from UnaryFunction

#parameter_one

Instance Method Summary collapse

Methods inherited from UnaryFunction

#==, #class_name, #initialize, #value_to_asciimath

Constructor Details

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

Instance Method Details

#to_asciimathObject



9
10
11
12
13
14
15
# File 'lib/plurimath/math/function/td.rb', line 9

def to_asciimath
  if parameter_one.length > 1
    "[#{parameter_one.map(&:to_asciimath).join(',')}]"
  else
    parameter_one.map(&:to_asciimath).join(",")
  end
end

#to_htmlObject



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

def to_html
  first_value = parameter_one.map(&:to_html).join
  "<td>#{first_value}</td>"
end

#to_latexObject



21
22
23
# File 'lib/plurimath/math/function/td.rb', line 21

def to_latex
  parameter_one.map(&:to_latex).join
end

#to_mathml_without_math_tagObject



17
18
19
# File 'lib/plurimath/math/function/td.rb', line 17

def to_mathml_without_math_tag
  "<mtd>#{parameter_one.map(&:to_mathml_without_math_tag).join}</mtd>"
end