Class: Perus::Pinger::ChromeReload
- Inherits:
-
ChromeCommand
- Object
- Command
- ChromeCommand
- Perus::Pinger::ChromeReload
- Defined in:
- lib/perus/pinger/commands/chrome_reload.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from ChromeCommand
Methods inherited from Command
abstract!, abstract?, #cleanup, #darwin?, description, human_name, inherited, #initialize, metric!, metric?, option, options, #shell, subclasses
Constructor Details
This class inherits a constructor from Perus::Pinger::Command
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/perus/pinger/commands/chrome_reload.rb', line 7 def run result = false execute(['{"id":1,"method":"Page.reload"}']) do || if .include?('id') && ['id'] == 1 if .include?('result') if ['result'] == {} result = true else result = ['result'].to_s end elsif .include?('error') result = ['error'].to_s else result = .to_s end end end result end |