class ReVIEW::Book::Index::Item

Attributes

caption[R]
content[R]
id[R]
index[RW]
number[R]

Public Class Methods

new(id, number, caption = nil) click to toggle source
# File lib/review/book/index/item.rb, line 19
def initialize(id, number, caption = nil)
  @id = id
  @number = number
  @caption = caption
  @path = nil
  @index = nil
end

Public Instance Methods

path() click to toggle source
# File lib/review/book/index/item.rb, line 34
def path
  if @path
    return @path
  end

  @path = @index.find_path(@id)

  @path
end