Class: Typhoeus::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/common/hacks.rb

Instance Method Summary collapse

Instance Method Details

#has_valid_hash?(error_404_hash, homepage_hash) ⇒ Boolean

Compare the body hash to error_404_hash and homepage_hash returns true if they are different, false otherwise

Returns:

  • (Boolean)

41
42
43
44
45
# File 'lib/common/hacks.rb', line 41

def has_valid_hash?(error_404_hash, homepage_hash)
  body_hash = WebSite.page_hash(self)

  body_hash != error_404_hash && body_hash != homepage_hash
end