Sha256: 1902fd48863443bb218d72828dc3a9a5f6098d64457ed667a2169dfa10d9c3f5

Contents?: true

Size: 624 Bytes

Versions: 4

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

require_relative "binary_function"

module Plurimath
  module Math
    module Function
      class Arg < BinaryFunction
        def to_mathml_without_math_tag(intent)
          first_value = parameter_one.to_mathml_without_math_tag(intent)
          first_value.attributes[:arg] = Utility.html_entity_to_unicode(parameter_two.value)
          first_value
        end

        def to_unicodemath
          first_value = "(#{parameter_two&.to_unicodemath} #{parameter_one&.to_unicodemath})" if parameter_one || parameter_two
          "ⓐ#{first_value}"
        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/arg.rb
plurimath-0.8.13 lib/plurimath/math/function/arg.rb
plurimath-0.8.12 lib/plurimath/math/function/arg.rb
plurimath-0.8.11 lib/plurimath/math/function/arg.rb