Class: ArticleJSON::Export::AMP::Elements::Embed

Inherits:
Base
  • Object
show all
Includes:
Common::HTML::Elements::Embed
Defined in:
lib/article_json/export/amp/elements/embed.rb

Instance Method Summary collapse

Methods included from Common::HTML::Elements::Embed

#export

Methods included from Common::HTML::Elements::Shared::Caption

#caption_node

Methods inherited from Base

namespace

Methods included from Common::HTML::Elements::Base

included

Instance Method Details

#custom_element_tagsArray[Symbol]

Custom element tags required for this embedded element

Returns:

  • (Array[Symbol])


10
11
12
13
14
15
16
17
18
19
20
# File 'lib/article_json/export/amp/elements/embed.rb', line 10

def custom_element_tags
  case @element.embed_type.to_sym
  when :youtube_video then %i(amp-youtube)
  when :vimeo_video then %i(amp-vimeo)
  when :facebook_video then %i(amp-facebook)
  when :tweet then %i(amp-twitter)
  when :slideshare then %i(amp-iframe)
  when :soundcloud then %i(amp-soundcloud)
  else []
  end
end