Sha256: b748644e4e6cce18a501c3d56950cb2a175db7835f019708eaa68518c2345665

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

require_relative "ternary_function"
module Plurimath
  module Math
    module Function
      class Rule < TernaryFunction
        FUNCTION = {
          name: "rule",
          first_value: "first argument",
          second_value: "second argument",
          third_value: "third argument",
        }.freeze

        def to_asciimath
          ""
        end

        def to_latex
          first_value = "[#{parameter_one.to_latex}]" if parameter_one
          second_value = "{#{parameter_two.to_latex}}" if parameter_two
          third_value = "{#{parameter_three.to_latex}}" if parameter_three
          "\\rule#{first_value}#{second_value}#{third_value}"
        end

        def to_mathml_without_math_tag(intent)
          Utility.ox_element("mi")
        end

        def to_omml_without_math_tag(_)
          [Utility.ox_element("m:r") << Utility.ox_element("m:t")]
        end

        def to_html
          ""
        end

        def to_unicodemath
          ""
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
plurimath-0.8.14 lib/plurimath/math/function/rule.rb
plurimath-0.8.13 lib/plurimath/math/function/rule.rb
plurimath-0.8.12 lib/plurimath/math/function/rule.rb
plurimath-0.8.11 lib/plurimath/math/function/rule.rb