Class: FlickrOfflineGallery::PhotoPage
- Inherits:
-
TemplateRenderer
- Object
- TemplateRenderer
- FlickrOfflineGallery::PhotoPage
- Defined in:
- lib/flickr_offline_gallery/photo_page.rb
Instance Method Summary collapse
-
#initialize(photo) ⇒ PhotoPage
constructor
A new instance of PhotoPage.
- #render ⇒ Object
- #write ⇒ Object
Methods inherited from TemplateRenderer
#render_erb, #template_contents, #template_directory, #template_path, #write_file
Methods included from VerbosePuts
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
#render ⇒ Object
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.) end |
#write ⇒ Object
18 19 20 |
# File 'lib/flickr_offline_gallery/photo_page.rb', line 18 def write write_file(@photo.full_html_path) end |