Sha256: 4312dcce8705236bf270310367ba97b271538a5fe24b015497a2e72b117e6ae9

Contents?: true

Size: 336 Bytes

Versions: 126

Compression:

Stored size: 336 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

126 entries across 126 versions & 1 rubygems

Version Path
onebox-1.5.38 lib/onebox/engine/html.rb
onebox-1.5.37 lib/onebox/engine/html.rb
onebox-1.5.36 lib/onebox/engine/html.rb
onebox-1.5.35 lib/onebox/engine/html.rb
onebox-1.5.34 lib/onebox/engine/html.rb
onebox-1.5.33 lib/onebox/engine/html.rb
onebox-1.5.32 lib/onebox/engine/html.rb
onebox-1.5.31 lib/onebox/engine/html.rb
onebox-1.5.30 lib/onebox/engine/html.rb
onebox-1.5.29 lib/onebox/engine/html.rb
onebox-1.5.28 lib/onebox/engine/html.rb
onebox-1.5.27 lib/onebox/engine/html.rb
onebox-1.5.26 lib/onebox/engine/html.rb
onebox-1.5.25 lib/onebox/engine/html.rb
onebox-1.5.24 lib/onebox/engine/html.rb
onebox-1.5.23 lib/onebox/engine/html.rb
onebox-1.5.22 lib/onebox/engine/html.rb
onebox-1.5.21 lib/onebox/engine/html.rb
onebox-1.5.20 lib/onebox/engine/html.rb
onebox-1.5.19 lib/onebox/engine/html.rb