Sha256: 0ddd79f65d0b3f35f49ea951079266dd13bb288e4a23b22dcc6045d248d358b1
Contents?: true
Size: 1.03 KB
Versions: 2
Compression:
Stored size: 1.03 KB
Contents
module View (@@proc_table ||= {})['image_page'] = proc do _buf = ""; _buf << "<html> <head> </head> <body> <h1>Variable in image page</h1> <table> <tr> <td> image.name </td> <td> "; _buf << ERB::Util.h(@image.name); _buf << " </td> </tr> <tr> <td> image.description </td> <td> "; _buf << ERB::Util.h(@image.description); _buf << " </td> </tr> <tr> <td> <pre>image.relroot</pre> </td> <td> "; _buf << ERB::Util.h(@image.relroot); _buf << " </td> </tr> </table> </body> </html>"; ; _buf end#proc module_function def expand_image_page(context={}) if context.is_a?(Hash) hash = context context = Object.new hash.each { |key, val| context.instance_variable_set("@#{key}", val) } end proc_obj = @@proc_table['image_page'] context.instance_eval(&proc_obj) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gf-ralbum-0.0.2 | lib/ralbum/skins/test_kwartz/out/image_page.rb |
gf-ralbum-0.0.5 | lib/ralbum/skins/test_kwartz/out/image_page.rb |