class ArticleJSON::Export::AMP::Exporter

Public Class Methods

namespace() click to toggle source

Return the module namespace this class is nested in @return [Module]

# File lib/article_json/export/amp/exporter.rb, line 29
def namespace
  ArticleJSON::Export::AMP
end

Public Instance Methods

amp_libraries() click to toggle source

Return an array with all the javascript libraries needed for some special AMP tags (like amp-facebook or amp-iframe) @return [Array<String>]

# File lib/article_json/export/amp/exporter.rb, line 20
def amp_libraries
  return @amp_libraries if defined? @amp_libraries
  @amp_libraries =
    CustomElementLibraryResolver.new(custom_element_tags).script_tags
end
custom_element_tags() click to toggle source

List of all used custom element tags, e.g. `[:'amp-iframe']` @return [Array]

# File lib/article_json/export/amp/exporter.rb, line 9
def custom_element_tags
  return @custom_element_tags if defined? @custom_element_tags
  @custom_element_tags =
    element_exporters
      .flat_map { |element| element.custom_element_tags }
      .uniq
end