Sha256: 02e7c78391b9960ebbeadc55130ea1c06445521fa5df1e3c3596820beb006d30

Contents?: true

Size: 1.05 KB

Versions: 4

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

require_relative "binary_function"

module Plurimath
  module Math
    module Function
      class Overset < BinaryFunction
        def to_mathml_without_math_tag
          first_value = parameter_one&.to_mathml_without_math_tag
          second_value = parameter_two&.to_mathml_without_math_tag
          over_tag = Utility.ox_element("mover")
          Utility.update_nodes(
            over_tag,
            [
              second_value,
              first_value,
            ],
          )
        end

        def to_omml_without_math_tag
          limupp   = Utility.ox_element("limUpp", namespace: "m")
          limupppr = Utility.ox_element("limUppPr", namespace: "m")
          limupppr << Utility.pr_element("ctrl", true, namespace: "m")
          Utility.update_nodes(
            limupp,
            [
              limupppr,
              omml_parameter(parameter_one, tag_name: "e"),
              omml_parameter(parameter_two, tag_name: "lim"),
            ],
          )
          [limupp]
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
plurimath-0.3.9 lib/plurimath/math/function/overset.rb
plurimath-0.3.8 lib/plurimath/math/function/overset.rb
plurimath-0.3.7 lib/plurimath/math/function/overset.rb
plurimath-0.3.6 lib/plurimath/math/function/overset.rb