Sha256: c39310c8d47278ada4b8fbd3b319dc62c51b2cc163a71898edbb4f20bbc24574

Contents?: true

Size: 644 Bytes

Versions: 25

Compression:

Stored size: 644 Bytes

Contents

# Copyright (c) 2017 Minero Aoki, Kenshi Muto
#               2002-2006 Minero Aoki
#
# This program is free software.
# You can distribute or modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
# For details of the GNU LGPL, see the file "COPYING".
#

module ReVIEW
  class LaTeXIndex
    def load(path)
      table = {}
      File.foreach(path) do |line|
        key, value = *line.strip.split(/\t+/, 2)
        table[key.sub(/\A%/, '')] = value
      end
      new(table)
    end

    def initialize(table)
      @table = table
    end

    def [](key)
      @table.fetch(key)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
review-3.0.0.preview3 lib/review/latexindex.rb
review-3.0.0.preview2 lib/review/latexindex.rb
review-3.0.0.preview1 lib/review/latexindex.rb
review-2.5.0 lib/review/latexindex.rb
review-2.4.0 lib/review/latexindex.rb