Class: ImageSite::Index
Instance Attribute Summary collapse
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#indexes ⇒ Object
Returns the value of attribute indexes.
Attributes inherited from Model
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(number, images, options) ⇒ Index
constructor
A new instance of Index.
- #relative_html ⇒ Object
- #write ⇒ Object
Methods inherited from Model
#make_subdir, template, #write_html
Constructor Details
#initialize(number, images, options) ⇒ Index
Returns a new instance of Index.
33 34 35 36 |
# File 'lib/image_site/index.rb', line 33 def initialize(number, images, ) super number, @images = images end |
Instance Attribute Details
#images ⇒ Object (readonly)
Returns the value of attribute images.
30 31 32 |
# File 'lib/image_site/index.rb', line 30 def images @images end |
#indexes ⇒ Object
Returns the value of attribute indexes.
31 32 33 |
# File 'lib/image_site/index.rb', line 31 def indexes @indexes end |
Class Method Details
Instance Method Details
#relative_html ⇒ Object
43 44 45 |
# File 'lib/image_site/index.rb', line 43 def relative_html "index#{if @number > 1 then @number end}.html" end |
#write ⇒ Object
38 39 40 41 |
# File 'lib/image_site/index.rb', line 38 def write images.each(&:write_thumbnail) write_html index: self end |