class Webgen::Context::HtmlHead::Proxy

Proxy object for working with the data structure needed by Webgen::ContentProcessor::HtmlHead.

Public Instance Methods

inline_fragment(type, content) click to toggle source

Add inline CSS or JS fragments to the HTML head section.

The type can either be :css for a CSS fragment or :js for a javascript fragment.

# File lib/webgen/context/html_head.rb, line 44
def inline_fragment(type, content)
  type_check!(type)
  (cp_hash["#{type}_inline".intern] ||= []) << content
end
meta(name, content) click to toggle source

Set the meta tag to the provided value.

Note that some meta information keys may not be specified multiple times!

# File lib/webgen/context/html_head.rb, line 21
def meta(name, content)
  (cp_hash[:meta] ||= {})[name] = content
end
meta_property(name, content) click to toggle source

Set the meta tag to the provided value, using property instead of name.

Note that some meta information keys may not be specified multiple times!

# File lib/webgen/context/html_head.rb, line 28
def meta_property(name, content)
  (cp_hash[:meta_property] ||= {})[name] = content
end