Class: ReVIEW::Book::ImageIndex

Inherits:
Index show all
Defined in:
lib/review/book/index.rb

Direct Known Subclasses

IconIndex, IndepImageIndex, NumberlessImageIndex

Defined Under Namespace

Classes: Item

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Index

#[], #each, #has_key?, item_class, #item_type, #number, parse

Constructor Details

#initialize(items, chapid, basedir, types, builder) ⇒ ImageIndex

Returns a new instance of ImageIndex.



162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/review/book/index.rb', line 162

def initialize(items, chapid, basedir, types, builder)
  super items
  items.each do |i|
    i.index = self
  end
  @chapid = chapid
  @basedir = basedir
  @types = types

  @image_finder = ReVIEW::Book::ImageFinder.new(basedir, chapid,
                                                builder, types)
end

Instance Attribute Details

#image_finderObject (readonly)

Returns the value of attribute image_finder.



160
161
162
# File 'lib/review/book/index.rb', line 160

def image_finder
  @image_finder
end

Class Method Details

.item_typeObject



156
157
158
# File 'lib/review/book/index.rb', line 156

def ImageIndex.item_type
  '(image|graph)'
end

Instance Method Details

#find_path(id) ⇒ Object



175
176
177
# File 'lib/review/book/index.rb', line 175

def find_path(id)
  @image_finder.find_path(id)
end