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-5.10.0 lib/review/latexindex.rb
review-5.9.0 lib/review/latexindex.rb
review-5.8.0 lib/review/latexindex.rb
review-5.7.0 lib/review/latexindex.rb
review-5.6.0 lib/review/latexindex.rb
review-5.5.0 lib/review/latexindex.rb
review-5.4.0 lib/review/latexindex.rb
review-5.3.0 lib/review/latexindex.rb
review-5.2.0 lib/review/latexindex.rb
review-5.1.1 lib/review/latexindex.rb
review-5.1.0 lib/review/latexindex.rb
review-5.0.0 lib/review/latexindex.rb
review-4.2.0 lib/review/latexindex.rb
review-4.1.0 lib/review/latexindex.rb
review-4.0.0 lib/review/latexindex.rb
review-3.2.0 lib/review/latexindex.rb
review-3.1.0 lib/review/latexindex.rb
review-3.0.0 lib/review/latexindex.rb
review-3.0.0.rc1 lib/review/latexindex.rb
review-3.0.0.preview4 lib/review/latexindex.rb