Class: Landable::Liquid::AssetAttributeTag
- Defined in:
- lib/landable/liquid/asset_tags.rb
Instance Attribute Summary
Attributes inherited from AssetTag
Instance Method Summary collapse
Methods inherited from AssetTag
Constructor Details
This class inherits a constructor from Landable::Liquid::AssetTag
Instance Method Details
#render(context) ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/landable/liquid/asset_tags.rb', line 62 def render(context) asset = lookup_asset context, asset_name attribute = tag_name.sub(/^asset_/, '') if attribute == 'url' asset.public_url else asset.send attribute end end |