Class: Hicube::Liquid::Tags::ImgTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Hicube::Liquid::Tags::ImgTag
- Defined in:
- lib/hicube/liquid/tags/img.rb
Instance Method Summary collapse
-
#initialize(tag_name, name, tokens) ⇒ ImgTag
constructor
A new instance of ImgTag.
- #render(context) ⇒ Object
Constructor Details
Instance Method Details
#render(context) ⇒ Object
12 13 14 |
# File 'lib/hicube/liquid/tags/img.rb', line 12 def render(context) @img.nil? ? "img src=\"image_not_found.png\" alt=\"image_not_found\"" : "img src=\"#{@img.file_url}\"" end |