lib/review/book/base.rb in review-1.6.0 vs lib/review/book/base.rb in review-1.7.0

- old
+ new

@@ -82,10 +82,18 @@ else config["page_metric"] end end + def htmlversion + if config["htmlversion"].blank? + nil + else + config["htmlversion"].to_i + end + end + def parts @parts ||= read_parts() end def parts_in_file @@ -109,11 +117,11 @@ def each_chapter(&block) chapters.each(&block) end def each_chapter_r(&block) - chapters.reverse.each(&block) + chapters.reverse_each(&block) end def chapter_index return @chapter_index if @chapter_index @@ -215,15 +223,15 @@ "" end end def read_PART - return @read_PART if @read_PART + return @read_part if @read_part if catalog - @read_PART = catalog.parts + @read_part = catalog.parts else - @read_PART = File.read("#{@basedir}/#{config["part_file"]}") + @read_part = File.read("#{@basedir}/#{config["part_file"]}") end end def part_exist? if catalog