Module: Browserctl::Commands::CliOutput
- Included in:
- Click, Fill, OpenPage, PauseResume, Screenshot, Watch
- Defined in:
- lib/browserctl/commands/cli_output.rb
Instance Method Summary collapse
Instance Method Details
#print_result(res) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/browserctl/commands/cli_output.rb', line 6 def print_result(res) if res.is_a?(Hash) && res[:error] warn "Error: #{res[:error]}" exit 1 end puts res.to_json end |