Class: ArticleJSON::Export::AMP::Exporter
- Inherits:
-
Object
- Object
- ArticleJSON::Export::AMP::Exporter
- Includes:
- Common::HTML::Exporter
- Defined in:
- lib/article_json/export/amp/exporter.rb
Class Method Summary collapse
-
.namespace ⇒ Module
Return the module namespace this class is nested in.
Instance Method Summary collapse
-
#amp_libraries ⇒ Array<String>
Return an array with all the javascript libraries needed for some special AMP tags (like amp-facebook or amp-iframe).
-
#custom_element_tags ⇒ Array[Symbol]
List of all used custom element tags, e.g.
Methods included from Common::HTML::Exporter
Class Method Details
.namespace ⇒ Module
Return the module namespace this class is nested in
29 30 31 |
# File 'lib/article_json/export/amp/exporter.rb', line 29 def namespace ArticleJSON::Export::AMP end |
Instance Method Details
#amp_libraries ⇒ Array<String>
Return an array with all the javascript libraries needed for some special AMP tags (like amp-facebook or amp-iframe)
20 21 22 23 24 |
# File 'lib/article_json/export/amp/exporter.rb', line 20 def amp_libraries return @amp_libraries if defined? @amp_libraries @amp_libraries = CustomElementLibraryResolver.new(). end |
#custom_element_tags ⇒ Array[Symbol]
List of all used custom element tags, e.g. ‘[:’amp-iframe’]‘
9 10 11 12 13 14 15 |
# File 'lib/article_json/export/amp/exporter.rb', line 9 def return @custom_element_tags if defined? @custom_element_tags @custom_element_tags = element_exporters .flat_map { |element| element. } .uniq end |