Class: Plurimath::Math::Function::Semantics

Inherits:
BinaryFunction show all
Defined in:
lib/plurimath/math/function/semantics.rb

Instance Attribute Summary

Attributes inherited from BinaryFunction

#parameter_one, #parameter_two

Instance Method Summary collapse

Methods inherited from BinaryFunction

#==, #initialize, #to_html

Methods inherited from Core

#class_name, #empty_tag, #insert_t_tag, #nary_attr_value, #omml_parameter, #r_element, #tag_name, #validate_function_formula

Constructor Details

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

Instance Method Details

#to_asciimathObject



22
23
24
# File 'lib/plurimath/math/function/semantics.rb', line 22

def to_asciimath
  parameter_one&.to_asciimath
end

#to_latexObject



18
19
20
# File 'lib/plurimath/math/function/semantics.rb', line 18

def to_latex
  parameter_one&.to_latex
end

#to_mathml_without_math_tagObject



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

def to_mathml_without_math_tag
  first_value = parameter_one&.to_mathml_without_math_tag
  second_value = other_tags(parameter_two)
  Utility.update_nodes(
    Utility.ox_element("semantics"),
    second_value.insert(0, first_value),
  )
end

#to_omml_without_math_tagObject



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

def to_omml_without_math_tag
  Array(parameter_one.insert_t_tag)
end