Class: HAR::Viewer
- Inherits:
-
Object
- Object
- HAR::Viewer
- Defined in:
- lib/har/viewer.rb
Instance Attribute Summary collapse
-
#har ⇒ Object
readonly
Returns the value of attribute har.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(args) ⇒ Viewer
constructor
A new instance of Viewer.
- #show ⇒ Object
Constructor Details
#initialize(args) ⇒ Viewer
Returns a new instance of Viewer.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/har/viewer.rb', line 9 def initialize(args) @running = false = parse(args) if args == ["-"] || args.empty? progress("Reading HAR from stdin...") { @har = Archive.from_file $stdin } validate_if_needed @har else hars = validate_if_needed(args) progress("Merging HARs...") { @har = Archive.by_merging hars } end end |
Instance Attribute Details
#har ⇒ Object (readonly)
Returns the value of attribute har.
7 8 9 |
# File 'lib/har/viewer.rb', line 7 def har @har end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/har/viewer.rb', line 7 def end |
Instance Method Details
#show ⇒ Object
28 29 30 31 32 |
# File 'lib/har/viewer.rb', line 28 def show s = server(create_root) launch_browser s.join end |