Method: ArticleJSON::Elements::Image#to_h

Defined in:
lib/article_json/elements/image.rb

#to_hHash

Hash representation of this image element



22
23
24
25
26
27
28
29
30
31
# File 'lib/article_json/elements/image.rb', line 22

def to_h
  {
    type: type,
    source_url: source_url,
    float: float,
    caption: caption.map(&:to_h),
    href: href,
    alt: alt,
  }
end