Sha256: 2fc0d75d5b83b07dca135d073fa6a1b9cec6261658f2443cebafcba506759a9e

Contents?: true

Size: 328 Bytes

Versions: 8

Compression:

Stored size: 328 Bytes

Contents

module AsciiMath
  class ColorTableBuilder
    def initialize()
      @table = {}
    end

    def add(*names, r, g, b)
      entry = {
          :r => r,
          :g => g,
          :b => b
      }.freeze

      names.each { |name| @table[name.freeze] = entry }
    end

    def build
      @table.dup.freeze
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
asciimath-2.0.5 lib/asciimath/color_table.rb
asciimath-2.0.4 lib/asciimath/color_table.rb
asciimath-2.0.3 lib/asciimath/color_table.rb
asciimath-2.0.2 lib/asciimath/color_table.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/asciimath-2.0.1/lib/asciimath/color_table.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/asciimath-2.0.1/lib/asciimath/color_table.rb
asciimath-2.0.1 lib/asciimath/color_table.rb
asciimath-2.0.0 lib/asciimath/color_table.rb