Class: FlickrOfflineGallery::PhotoPage

Inherits:
TemplateRenderer show all
Defined in:
lib/flickr_offline_gallery/photo_page.rb

Instance Method Summary collapse

Methods inherited from TemplateRenderer

#render_erb, #template_contents, #template_directory, #template_path, #write_file

Methods included from VerbosePuts

#verbose_puts

Constructor Details

#initialize(photo) ⇒ PhotoPage

Returns a new instance of PhotoPage.



4
5
6
7
# File 'lib/flickr_offline_gallery/photo_page.rb', line 4

def initialize(photo)
  @photo = photo
  super("photo")
end

Instance Method Details

#renderObject



9
10
11
12
13
14
15
16
# File 'lib/flickr_offline_gallery/photo_page.rb', line 9

def render
  render_erb(:back_to_index_page => @photo.back_to_index_url,
        :image_url => @photo.img_filename,
        :sizes => @photo.sizes,
        :photo_page_url => @photo.url,
        :title => @photo.title,
        :author => @photo.author)
end

#writeObject



18
19
20
# File 'lib/flickr_offline_gallery/photo_page.rb', line 18

def write
  write_file(@photo.full_html_path)
end