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.4.5 lib/onebox/engine/html.rb
onebox-1.4.4 lib/onebox/engine/html.rb
onebox-1.4.3 lib/onebox/engine/html.rb
onebox-1.4.2 lib/onebox/engine/html.rb
onebox-1.4.1 lib/onebox/engine/html.rb
onebox-1.4.0 lib/onebox/engine/html.rb
onebox-1.3.9 lib/onebox/engine/html.rb
onebox-1.3.8 lib/onebox/engine/html.rb
onebox-1.3.7 lib/onebox/engine/html.rb
onebox-1.3.6 lib/onebox/engine/html.rb
onebox-1.3.5 lib/onebox/engine/html.rb
onebox-1.3.4 lib/onebox/engine/html.rb
onebox-1.3.3 lib/onebox/engine/html.rb
onebox-1.3.2 lib/onebox/engine/html.rb
onebox-1.3.1 lib/onebox/engine/html.rb
onebox-1.3.0 lib/onebox/engine/html.rb
onebox-1.2.9 lib/onebox/engine/html.rb
onebox-1.2.8 lib/onebox/engine/html.rb
onebox-1.2.7 lib/onebox/engine/html.rb
onebox-1.2.6 lib/onebox/engine/html.rb