56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/notion_rails/base_block.rb', line 56
def render(options = {})
case @type
when 'paragraph' then render_paragraph(rich_text, class: options[:paragraph])
when 'heading_1' then render_heading_1(rich_text, class: options[:heading_1])
when 'heading_2' then render_heading_2(rich_text, class: options[:heading_2])
when 'heading_3' then render_heading_3(rich_text, class: options[:heading_3])
when 'table_of_contents' then render_table_of_contents
when 'bulleted_list_item'
render_bulleted_list_item(rich_text, @siblings, @children, class: options[:bulleted_list_item])
when 'numbered_list_item'
render_numbered_list_item(rich_text, @siblings, @children, class: options[:numbered_list_item])
when 'quote' then render_quote(rich_text, class: options[:quote])
when 'callout' then render_callout(rich_text, icon, class: options[:callout])
when 'code' then render_code(rich_text, class: options[:code], language: @properties['language'])
when 'image' then render_image(*multi_media, class: options[:image])
when 'video' then render_video(*multi_media, class: options[:video])
else
'Error'
end
end
|