class ReVIEW::Book::ChapterIndex
Public Instance Methods
display_string(id)
click to toggle source
# File lib/review/book/index.rb, line 104 def display_string(id) "#{number(id)}#{I18n.t('chapter_quote', title(id))}" end
item_type()
click to toggle source
# File lib/review/book/index.rb, line 85 def item_type 'chapter' end
number(id)
click to toggle source
# File lib/review/book/index.rb, line 89 def number(id) chapter = @index.fetch(id) begin chapter.format_number rescue # part I18n.t('part', chapter.number) end end
title(id)
click to toggle source
# File lib/review/book/index.rb, line 98 def title(id) @index.fetch(id).title rescue # non-file part @index.fetch(id).name end