Class: Appium::Common::Command::WsLogcat
- Inherits:
-
Appium::Core::WebSocket
- Object
- Appium::Core::WebSocket
- Appium::Common::Command::WsLogcat
- Defined in:
- lib/appium_lib/common/command/ws_logcat.rb
Instance Method Summary collapse
- #handle_message_data(data) ⇒ Object
-
#initialize(url:, output_file: 'logcat.log') ⇒ WsLogcat
constructor
A new instance of WsLogcat.
Constructor Details
#initialize(url:, output_file: 'logcat.log') ⇒ WsLogcat
Returns a new instance of WsLogcat.
19 20 21 22 |
# File 'lib/appium_lib/common/command/ws_logcat.rb', line 19 def initialize(url:, output_file: 'logcat.log') super(url: url) @output_file = output_file end |
Instance Method Details
#handle_message_data(data) ⇒ Object
24 25 26 |
# File 'lib/appium_lib/common/command/ws_logcat.rb', line 24 def (data) File.open(@output_file, 'a') { |f| f.write("#{data}\n") } end |