Skip to content

Commit

Permalink
add Book::Bib for bib.re
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashim committed Aug 23, 2020
1 parent 28cbb43 commit c5475b7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/review/book/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#
require 'review/configure'
require 'review/catalog'
require 'review/book/bib'

module ReVIEW
module Book
Expand Down Expand Up @@ -124,7 +125,7 @@ def create_chapter_index

def generate_indexes
if bib_exist?
bib = ReVIEW::Book::BookUnit.new(file_content: bib_content, book: self)
bib = ReVIEW::Book::Bib.new(file_content: bib_content, book: self)
bib.generate_indexes(use_bib: true)
@bibpaper_index = bib.bibpaper_index
end
Expand Down
21 changes: 21 additions & 0 deletions lib/review/book/bib.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2009-2020 Minero Aoki, Kenshi Muto
#
# 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".
#
require 'review/book/book_unit'
require 'review/lineinput'
require 'review/preprocessor'

module ReVIEW
module Book
class Bib < BookUnit
def number
nil
end
end
end
end
4 changes: 0 additions & 4 deletions lib/review/book/book_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ def generate_indexes(use_bib: false)
end
end

def number
nil
end

def dirname
@path && File.dirname(@path)
end
Expand Down

0 comments on commit c5475b7

Please sign in to comment.