Sha256: 4c5a53151e5db084a047f4d0496c581bc195ab2dcd5104937b32ebaa571ada2f

Contents?: true

Size: 465 Bytes

Versions: 2

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

require 'json'

module Aranha
  module Parsers
    module Firefox
      class UriFromHar
        class << self
          def from_file(path)
            new(::JSON.parse(path.to_pathname.read))
          end
        end

        common_constructor :data

        def result
          data.fetch('log').fetch('entries').map { |e| e.fetch('request').fetch('url') }
        end

        def request_data; end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aranha-parsers-0.25.0 lib/aranha/parsers/firefox/uri_from_har.rb
aranha-parsers-0.24.0 lib/aranha/parsers/firefox/uri_from_har.rb