Sha256: b341b725ff864efc884112075cf1961bb19f86c3f0c82c69b53c10031c85bf74

Contents?: true

Size: 496 Bytes

Versions: 11

Compression:

Stored size: 496 Bytes

Contents

# frozen_string_literal: true

module Unitsml
  class Sqrt
    attr_accessor :value

    def initialize(value)
      @value = value
    end

    def ==(object)
      self.class == object.class &&
        value == object&.value
    end

    def to_asciimath
      value&.to_asciimath
    end

    def to_latex
      value&.to_latex
    end

    def to_mathml
      value&.to_mathml
    end

    def to_html
      value&.to_html
    end

    def to_unicode
      value.to_unicode
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
unitsml-0.8.18 lib/unitsml/sqrt.rb
unitsml-0.2.9 lib/unitsml/sqrt.rb
unitsml-0.2.8 lib/unitsml/sqrt.rb
unitsml-0.2.7 lib/unitsml/sqrt.rb
unitsml-0.2.6 lib/unitsml/sqrt.rb
unitsml-0.2.5 lib/unitsml/sqrt.rb
unitsml-0.2.4 lib/unitsml/sqrt.rb
unitsml-0.2.3 lib/unitsml/sqrt.rb
unitsml-0.2.2 lib/unitsml/sqrt.rb
unitsml-0.2.1 lib/unitsml/sqrt.rb
unitsml-0.2.0 lib/unitsml/sqrt.rb