Sha256: b08ab70d157028e589ce8c4d7c924c110efcb2fe22e16d874a493b96999c6182

Contents?: true

Size: 531 Bytes

Versions: 2

Compression:

Stored size: 531 Bytes

Contents

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
      "\\left(#{value.to_tex}\\right)"
    end

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

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


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
danica-2.4.2 lib/danica/wrapper/group.rb
danica-2.4.1 lib/danica/wrapper/group.rb