Rename page_contents to page_content

This commit is contained in:
Sam Ford 2020-12-19 00:21:29 -05:00
parent a55686a0e2
commit 1bd2be5e04
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE
3 changed files with 5 additions and 5 deletions

View File

@ -110,9 +110,9 @@ module Homebrew
headers
end
def self.page_contents(url)
@page_contents ||= {}
@page_contents[url] ||= URI.parse(url).open.read
def self.page_content(url)
@page_content ||= {}
@page_content[url] ||= URI.parse(url).open.read
end
end
end

View File

@ -47,7 +47,7 @@ module Homebrew
# content
# @return [Array]
def self.page_matches(url, regex, &block)
page = Strategy.page_contents(url)
page = Strategy.page_content(url)
if block
case (value = block.call(page))

View File

@ -23,7 +23,7 @@ module Homebrew
match_data = { matches: {}, regex: regex, url: url }
contents = Strategy.page_contents(url)
contents = Strategy.page_content(url)
if (item = item_from_content(contents))
match = if block