Sha256: f8cfe832cde4cf6af92b8169e07e556689578abd393d15b12fd88557fb9c4f12

Contents?: true

Size: 662 Bytes

Versions: 25

Compression:

Stored size: 662 Bytes

Contents

#
# $Id: latexindex.rb 2204 2006-03-18 06:10:26Z aamine $
#
# Copyright (c) 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 & 3 rubygems

Version Path
review-2.3.0 lib/review/latexindex.rb
review-2.2.0 lib/review/latexindex.rb
review-2.1.0 lib/review/latexindex.rb
review-2.0.0 lib/review/latexindex.rb
review-1.7.2 lib/review/latexindex.rb
review-1.7.1 lib/review/latexindex.rb
review-peg-0.2.2 lib/review/latexindex.rb
review-peg-0.2.1 lib/review/latexindex.rb
review-peg-0.2.0 lib/review/latexindex.rb
review-peg-0.1.3 lib/review/latexindex.rb
review-peg-0.1.2 lib/review/latexindex.rb
review-peg-0.1.1 lib/review/latexindex.rb
review-peg-0.1.0 lib/review/latexindex.rb
review-1.7.0 lib/review/latexindex.rb
review-1.6.0 lib/review/latexindex.rb
review-2.0.0.beta1 lib/review/latexindex.rb
review-1.5.0 lib/review/latexindex.rb
review-1.4.0 lib/review/latexindex.rb
review-1.3.0 lib/review/latexindex.rb
review-1.2.0 lib/review/latexindex.rb