Class: ReVIEW::Book::ImageIndex

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

Direct Known Subclasses

IconIndex, IndepImageIndex, NumberlessImageIndex

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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
# File 'lib/review/book/index.rb', line 138

def initialize(chapter)
  super()
  @chapter = chapter
  @image_finder = ReVIEW::Book::ImageFinder.new(@chapter)
end

Instance Attribute Details

#image_finderObject (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_typeObject



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



144
145
146
# File 'lib/review/book/index.rb', line 144

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