Sha256: b0f088eb3e233e6391086a91ff8bb63e21b05766c9358fed2e87021a5af9cf05

Contents?: true

Size: 596 Bytes

Versions: 1

Compression:

Stored size: 596 Bytes

Contents

# frozen_string_literal: true

module Danica
  class Wrapper::Group
    include Common
    include BaseOperations

    attr_accessor :value

    default_value :priority, 10
    default_value :is_grouped?, true

    delegate :to_f, :valued?, to: :value

    def initialize(value)
      @value = wrap_value(value)
    end

    def to_tex(**options)
      "\\left(#{value.to_tex(options)}\\right)"
    end

    def to_gnu(**options)
      "(#{value.to_gnu(options)})"
    end

    def ==(other)
      return value == other unless other.is_a?(self.class)
      value == other.value
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danica-2.7.5 lib/danica/wrapper/group.rb