class ArticleJSON::Export::AMP::Elements::Image

Private Instance Methods

default_height() click to toggle source
# File lib/article_json/export/amp/elements/image.rb, line 23
def default_height
  '480'
end
default_width() click to toggle source
# File lib/article_json/export/amp/elements/image.rb, line 19
def default_width
  '640'
end
image_node() click to toggle source

@return [Nokogiri::HTML::NodeSet]

# File lib/article_json/export/amp/elements/image.rb, line 11
def image_node
  create_element('amp-img',
                 src: @element.source_url,
                 width: default_width,
                 height: default_height,
                 layout: :responsive)
end