Sha256: e7c8c5ae43cf79f06e338998602a410d5a84bea7d2c9a8aa50d5dd668725d485

Contents?: true

Size: 986 Bytes

Versions: 3

Compression:

Stored size: 986 Bytes

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
          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
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
plurimath-0.7.2 lib/plurimath/math/function/rule.rb
plurimath-0.7.1 lib/plurimath/math/function/rule.rb
plurimath-0.7.0 lib/plurimath/math/function/rule.rb