Sha256: 50a747bc1b60c91f3bc0229fbe8e8787ae8fa8b450c34c46bca8cb1a58d1be73
Contents?: true
Size: 868 Bytes
Versions: 11
Compression:
Stored size: 868 Bytes
Contents
module BibTeX class ParseError < StandardError; end # # Represents a lexical or syntactical error. # class Error < Element attr_reader :trace def initialize(trace=[]) @trace = trace end def trace=(trace) raise(ArgumentError, "BibTeX::Error trace must be of type Array; was: #{trace.class.name}.") unless trace.kind_of?(Array) @trace = trace end def content @trace.map { |e| e[1] }.join end # Called when the element was added to a bibliography. def added_to_bibliography(bibliography) super(bibliography) bibliography.errors << self self end # Called when the element was removed from a bibliography. def removed_from_bibliography(bibliography) super(bibliography) bibliography.errors.delete(self) self end end end
Version data entries
11 entries across 11 versions & 1 rubygems