Class: BookRanking
- Inherits:
-
Mustache
- Object
- Mustache
- BookRanking
- Defined in:
- lib/zine_brewer/templates/bookranking.rb
Instance Method Summary collapse
Instance Method Details
#cover ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/zine_brewer/templates/bookranking.rb', line 25 def cover case File.dirname(src) when ".", "images" f = File.basename(src) "/static/images/article/■記事ID■/#{/^\d+_/ =~ f ? f : '■記事ID■_' + f}" when "common" "/static/images/article/common/#{File.basename(src)}" else src end end |
#description ⇒ Object
21 22 23 |
# File 'lib/zine_brewer/templates/bookranking.rb', line 21 def description Mustache.new.render(desc, {book: "『[#{title}](#{url})』"}) end |