Class: ArticleJSON::Export::AppleNews::Elements::Paragraph

Inherits:
Base
  • Object
show all
Defined in:
lib/article_json/export/apple_news/elements/paragraph.rb

Instance Method Summary collapse

Methods inherited from Base

namespace

Methods included from Common::Elements::Base

included, #initialize

Instance Method Details

#exportHash

Generate the paragraph node with its containing text elements

Returns:

  • (Hash)


8
9
10
11
12
13
14
15
16
# File 'lib/article_json/export/apple_news/elements/paragraph.rb', line 8

def export
  {
    role: 'body',
    text: text,
    format: 'html',
    layout: 'bodyLayout',
    textStyle: 'bodyStyle',
  }
end