Fix Style/VerboseBlock issues

This commit is contained in:
syeopite
2021-09-24 19:42:43 -07:00
parent 35d15c7c2b
commit e91421253e
15 changed files with 44 additions and 44 deletions

View File

@@ -62,7 +62,7 @@ def get_about_info(ucid, locale)
description_html = HTML.escape(description).gsub("\n", "<br>")
is_family_friendly = initdata["microformat"]["microformatDataRenderer"]["familySafe"].as_bool
allowed_regions = initdata["microformat"]["microformatDataRenderer"]["availableCountries"].as_a.map { |a| a.as_s }
allowed_regions = initdata["microformat"]["microformatDataRenderer"]["availableCountries"].as_a.map(&.as_s)
related_channels = [] of AboutRelatedChannel
else
@@ -84,7 +84,7 @@ def get_about_info(ucid, locale)
description_html = HTML.escape(description).gsub("\n", "<br>")
is_family_friendly = initdata["microformat"]["microformatDataRenderer"]["familySafe"].as_bool
allowed_regions = initdata["microformat"]["microformatDataRenderer"]["availableCountries"].as_a.map { |a| a.as_s }
allowed_regions = initdata["microformat"]["microformatDataRenderer"]["availableCountries"].as_a.map(&.as_s)
related_channels = initdata["contents"]["twoColumnBrowseResultsRenderer"]
.["secondaryContents"]?.try &.["browseSecondaryContentsRenderer"]["contents"][0]?
@@ -149,7 +149,7 @@ def get_about_info(ucid, locale)
end
end
end
tabs = tabs_json.reject { |node| node["tabRenderer"]?.nil? }.map { |node| node["tabRenderer"]["title"].as_s.downcase }
tabs = tabs_json.reject { |node| node["tabRenderer"]?.nil? }.map(&.["tabRenderer"].["title"].as_s.downcase)
end
sub_count = initdata["header"]["c4TabbedHeaderRenderer"]?.try &.["subscriberCountText"]?.try &.["simpleText"]?.try &.as_s?