Class: Landable::Liquid::Head

Inherits:
Tag
  • Object
show all
Defined in:
lib/landable/liquid/tags.rb

Instance Method Summary collapse

Instance Method Details

#render(context) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/landable/liquid/tags.rb', line 44

def render(context)
  lookup_page context

  head = []

  %w(title_tag meta_tags head_content).each do |tag_name|
    tag = "Landable::Liquid::#{tag_name.classify}".safe_constantize.new(tag_name, nil, nil)
    head << tag.render(context) if tag.render(context).present?
  end

  head.join("\n")
end