Class: ImageGallery2017::IndexGallery

Inherits:
Gallery
  • Object
show all
Defined in:
lib/imagegallery2017.rb

Instance Attribute Summary

Attributes inherited from Gallery

#folder

Instance Method Summary collapse

Methods inherited from Gallery

#add_image, #delete_image

Constructor Details

#initialize(rsc, filepath: '.', log: nil) ⇒ IndexGallery

Returns a new instance of IndexGallery.



104
105
106
107
108
109
110
# File 'lib/imagegallery2017.rb', line 104

def initialize(rsc, filepath: '.', log: nil)

  FileUtils.mkdir_p File.join(filepath, 'www','images')
  FileUtils.mkdir_p File.join(filepath, 'www','xsl')
  super(rsc, filepath: filepath, log: log)

end

Instance Method Details

#renderObject



112
113
114
115
116
117
118
# File 'lib/imagegallery2017.rb', line 112

def render()
  
  @log.info 'IndexGallery/render: active' if @log
  
  File.write File.join(@wwwpath, 'index.html'), super()

end