Sha256: 11a6423b07d91ce6ec5ceffe559b1c5232f31c89477b449ac3ceebb889901f2a

Contents?: true

Size: 536 Bytes

Versions: 2

Compression:

Stored size: 536 Bytes

Contents

require 'json'
require 'json-schema'
require 'time'

module HAR
  class Error < StandardError; end
  class ValidationError < StandardError; end
end

require 'har/serializable'
require 'har/schema_type'
require 'har/page'
require 'har/archive'
require 'har/viewer'

module Enumerable
  def group_by
    assoc = {}

    each do |element|
      key = yield(element)

      if assoc.has_key?(key)
        assoc[key] << element
      else
        assoc[key] = [element]
      end
    end

    assoc
  end unless [].respond_to?(:group_by)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
har-0.0.1 lib/har.rb
har-0.0.1.dev lib/har.rb