Skip to content

Commit 062730d

Browse files
committed
feat(snippets/webpage.rb): create carousels_widget_data_for method
1 parent 9498a91 commit 062730d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/cortex/snippets/webpage.rb

+8
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ def tables_widget_data_for(section_name)
6767
tables_widget_data&.[](section_name) || []
6868
end
6969

70+
def carousels_widget_data
71+
JSON.parse(@webpage[:carousels_widget_json] || 'null', quirks_mode: true)
72+
end
73+
74+
def carousels_widget_data_for(section_name)
75+
carousels_widget_data&.[](section_name)
76+
end
77+
7078
def accordion_group_widget_data
7179
JSON.parse(@webpage[:accordion_group_widget_json] || 'null', quirks_mode: true)
7280
end

0 commit comments

Comments
 (0)