Sha256: 206f54e378d6b60bf96aae22589f4cdf3173e1f99f1e6618c0b50ee1152417d8

Contents?: true

Size: 338 Bytes

Versions: 3

Compression:

Stored size: 338 Bytes

Contents

module Onebox
  module Engine
    module HTML
      private

      # Overwrite for any custom headers
      def http_params
        {}
      end

      def raw
        @raw ||= Nokogiri::HTML(open(url, { read_timeout: timeout }.merge(http_params)).read)
      end

      def html?
        raw.respond_to(:css)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
onebox-1.8.25 lib/onebox/engine/html.rb
onebox-1.8.24 lib/onebox/engine/html.rb
onebox-1.8.23 lib/onebox/engine/html.rb