Class: Spud::Banners::BannerSetTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Spud::Banners::BannerSetTag
show all
- Includes:
- ActionView::Context, ActionView::Helpers, Sprockets::Rails::Helper, SpudBannersHelper
- Defined in:
- lib/spud_banners/liquid_tags.rb
Instance Method Summary
collapse
#spud_banner_image_tag, #spud_banner_tag, #spud_banners_for_set
Constructor Details
#initialize(tag_name, set_identifer, tokens) ⇒ BannerSetTag
Returns a new instance of BannerSetTag.
14
15
16
|
# File 'lib/spud_banners/liquid_tags.rb', line 14
def initialize(tag_name, set_identifer, tokens)
@banner_set = SpudBannerSet.find_by_identifier(set_identifer)
end
|
Instance Method Details
#render(context) ⇒ Object
26
27
28
|
# File 'lib/spud_banners/liquid_tags.rb', line 26
def render(context)
return spud_banners_for_set(@banner_set)
end
|
#tag_name ⇒ Object
18
19
20
|
# File 'lib/spud_banners/liquid_tags.rb', line 18
def tag_name
return 'banner_set'
end
|
#tag_value ⇒ Object
22
23
24
|
# File 'lib/spud_banners/liquid_tags.rb', line 22
def tag_value
return @banner_set.name
end
|