Method: ArticleJSON::Elements::Quote#to_h

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

#to_hHash

Hash representation of this quote element

Returns:

  • (Hash)


18
19
20
21
22
23
24
25
# File 'lib/article_json/elements/quote.rb', line 18

def to_h
  {
    type: type,
    float: float,
    content: content.map(&:to_h),
    caption: caption.map(&:to_h),
  }
end