Rename page_contents to page_content
This commit is contained in:
parent
a55686a0e2
commit
1bd2be5e04
@ -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
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user