Class: ReVIEW::Book::ImageIndex
Direct Known Subclasses
Instance Attribute Summary collapse
-
#image_finder ⇒ Object
readonly
Returns the value of attribute image_finder.
Class Method Summary collapse
Instance Method Summary collapse
- #find_path(id) ⇒ Object
-
#initialize(chapter) ⇒ ImageIndex
constructor
A new instance of ImageIndex.
Methods inherited from Index
#[], #add_item, #each, #item_type, #key?, #number, #size
Constructor Details
#initialize(chapter) ⇒ ImageIndex
Returns a new instance of ImageIndex.
138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/review/book/index.rb', line 138 def initialize(chapter) super() @chapter = chapter book = @chapter.book chapid = chapter.id basedir = book.imagedir builder = book.config['builder'] types = book.image_types @image_finder = ReVIEW::Book::ImageFinder.new(basedir, chapid, builder, types) end |
Instance Attribute Details
#image_finder ⇒ Object (readonly)
Returns the value of attribute image_finder.
136 137 138 |
# File 'lib/review/book/index.rb', line 136 def image_finder @image_finder end |
Class Method Details
.item_type ⇒ Object
132 133 134 |
# File 'lib/review/book/index.rb', line 132 def self.item_type '(image|graph|imgtable)' end |
Instance Method Details
#find_path(id) ⇒ Object
151 152 153 |
# File 'lib/review/book/index.rb', line 151 def find_path(id) @image_finder.find_path(id) end |