Module: HTML::Proofer::Cache

Defined in:
lib/html/proofer/cache.rb

Class Method Summary collapse

Class Method Details

.create_nokogiri(path) ⇒ Object


4
5
6
7
8
9
10
11
12
# File 'lib/html/proofer/cache.rb', line 4

def create_nokogiri(path)
  if File.exist? path
    content = File.open(path).read
  else
    content = path
  end

  Nokogiri::HTML(content)
end