Sha256: 447c9cbf2cd6146bbbfb7af899621e170ff7d0cceb1eb7d003cf61cfa1408da3
Contents?: true
Size: 752 Bytes
Versions: 76
Compression:
Stored size: 752 Bytes
Contents
module Pageflow module EmbedCodeHelper def embed_code_entry_snippet(entry) Pageflow::EmbedCodeHelper::EntrySnippet.new(pageflow, entry) end class EntrySnippet def initialize(routes, entry) @routes = routes @entry = entry end def call %'<iframe src="#{url(entry)}" scrolling="no" allowfullscreen></iframe>' end private attr_reader :routes, :entry def url(entry) routes.entry_embed_url(entry, entry_embed_url_options(entry)) end def entry_embed_url_options(entry) options = Pageflow.config.entry_embed_url_options options = options.call(entry.theming) if options.respond_to?(:call) options end end end end
Version data entries
76 entries across 76 versions & 1 rubygems