Class: RailsParseHead::Fetch

Inherits:
Base
  • Object
show all
Defined in:
lib/rails_parse_head/fetch.rb

Constant Summary collapse

CONTENT_TYPES =
%w[text/html text/plain].freeze

Instance Attribute Summary

Attributes inherited from Base

#html

Instance Method Summary collapse

Methods inherited from Base

#links, #metas, #title

Constructor Details

#initialize(url, options = {}) ⇒ Fetch

Returns a new instance of Fetch.



7
8
9
# File 'lib/rails_parse_head/fetch.rb', line 7

def initialize(url, options = {})
  @html = document(request(url, options))
end