Sha256: fb9cb0b6ca13e0a5780699a50acd626dd79e73868dad55d926341879e16e0aa3
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
module View (@@proc_table ||= {})['album_page'] = proc do _buf = ""; _buf << "<html> <head> </head> <body> <table> <h1>Variables in album page</h1> <tr> <td> <pre>album.name</pre> </td> <td> "; _buf << ERB::Util.h(@album.name); _buf << " </td> </tr> <tr> <td> <pre>album.description</pre> </td> <td> "; _buf << ERB::Util.h(@album.description); _buf << " </td> </tr> <tr> <td> <pre>album.relroot</pre> </td> <td> "; _buf << ERB::Util.h(@album.relroot); _buf << " </td> </tr> </table> </body> </html>"; ; _buf end#proc module_function def expand_album_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['album_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/album_page.rb |
gf-ralbum-0.0.5 | lib/ralbum/skins/test_kwartz/out/album_page.rb |