Method: ArticleJSON::Elements::Text#to_h

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

#to_hHash

Hash representation of this text node

Returns:

  • (Hash)


20
21
22
23
24
25
26
27
28
# File 'lib/article_json/elements/text.rb', line 20

def to_h
  {
    type: type,
    content: content,
    bold: bold,
    italic: italic,
    href: href,
  }
end