class AsciiMath::ColorTableBuilder

Public Class Methods

new() click to toggle source
# File lib/asciimath/color_table.rb, line 3
def initialize()
  @table = {}
end

Public Instance Methods

add(*names, r, g, b) click to toggle source
# File lib/asciimath/color_table.rb, line 7
def add(*names, r, g, b)
  entry = {
      :r => r,
      :g => g,
      :b => b
  }.freeze

  names.each { |name| @table[name.freeze] = entry }
end
build() click to toggle source
# File lib/asciimath/color_table.rb, line 17
def build
  @table.dup.freeze
end