Class: BadPigeon::HARArchive
- Inherits:
-
Object
- Object
- BadPigeon::HARArchive
- Defined in:
- lib/bad_pigeon/har/har_archive.rb
Overview
Represents a whole request archive bundle loaded from a *.har file.
An archive consists of some number of requests (HARRequest).
Instance Method Summary collapse
-
#initialize(data) ⇒ HARArchive
constructor
A new instance of HARArchive.
- #inspect ⇒ Object
- #requests ⇒ Object
Constructor Details
#initialize(data) ⇒ HARArchive
Returns a new instance of HARArchive.
11 12 13 |
# File 'lib/bad_pigeon/har/har_archive.rb', line 11 def initialize(data) @json = JSON.parse(data) end |
Instance Method Details
#inspect ⇒ Object
19 20 21 |
# File 'lib/bad_pigeon/har/har_archive.rb', line 19 def inspect to_s end |
#requests ⇒ Object
15 16 17 |
# File 'lib/bad_pigeon/har/har_archive.rb', line 15 def requests @json['log']['entries'].map { |j| HARRequest.new(j) } end |