Skip to content

Commit 3825c23

Browse files
committed
feat(webpage.rb): create buy_box_widget_data method
1 parent 38bc585 commit 3825c23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/cortex/snippets/webpage.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,15 @@ def accordion_group_widget_data
7474
def accordion_group_widget_data_for(section_name)
7575
accordion_group_widget_data&.[](section_name) || []
7676
end
77-
77+
7878
def charts_widget_data
7979
JSON.parse(@webpage[:charts_widget_json] || 'null', quirks_mode: true)
8080
end
8181

82+
def buy_box_widget_data
83+
JSON.parse(@webpage[:buy_box_widget_json] || 'null', quirks_mode: true)
84+
end
85+
8286
def charts_widget_data_for(section_name)
8387
charts_widget_data&.[](section_name) || {}
8488
end

0 commit comments

Comments
 (0)