Sha256: 57ea11a8bd811aecd59e0578101c7d5af197a9c70a76f9cce6d16f77295d55f1
Contents?: true
Size: 561 Bytes
Versions: 5
Compression:
Stored size: 561 Bytes
Contents
module AsciidoctorBibliography class Bibliographer attr_accessor :citations attr_accessor :indices attr_accessor :database attr_reader :occurring_keys attr_accessor :options def initialize @options = {} @citations = [] @indices = [] @database = nil @occurring_keys = [] end def add_citation(citation) citations << citation @occurring_keys.concat(citation.citation_items.map(&:key)).uniq! end def appearance_index_of(id) @occurring_keys.index(id) + 1 end end end
Version data entries
5 entries across 5 versions & 1 rubygems