Sha256: ba7688c590e6e528250631ed68e7d033d88d0204e9742bf82df7b0041c079efa

Contents?: true

Size: 426 Bytes

Versions: 10

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

module Onebox
  module Engine
    module HTML
      private

      # Overwrite for any custom headers
      def http_params
        {}
      end

      def raw
        @raw ||= Onebox::Helpers.fetch_html_doc(url, http_params, body_cacher)
      end

      def body_cacher
        self.options&.[](:body_cacher)
      end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
onebox-2.2.19 lib/onebox/engine/html.rb
onebox-2.2.18 lib/onebox/engine/html.rb
onebox-2.2.17 lib/onebox/engine/html.rb
onebox-2.2.16 lib/onebox/engine/html.rb
onebox-2.2.15 lib/onebox/engine/html.rb
onebox-2.2.14 lib/onebox/engine/html.rb
onebox-2.2.13 lib/onebox/engine/html.rb
onebox-2.2.12 lib/onebox/engine/html.rb
onebox-2.2.11 lib/onebox/engine/html.rb
onebox-2.2.10 lib/onebox/engine/html.rb