Class: Capybara::Driver::Webkit::SocketDebugger
- Inherits:
-
Object
- Object
- Capybara::Driver::Webkit::SocketDebugger
- Defined in:
- lib/capybara/driver/webkit/socket_debugger.rb
Class Method Summary collapse
Instance Method Summary collapse
- #gets ⇒ Object
-
#initialize(socket) ⇒ SocketDebugger
constructor
A new instance of SocketDebugger.
- #print(content) ⇒ Object
- #puts(line) ⇒ Object
- #read(length) ⇒ Object
Constructor Details
#initialize(socket) ⇒ SocketDebugger
Returns a new instance of SocketDebugger.
10 11 12 |
# File 'lib/capybara/driver/webkit/socket_debugger.rb', line 10 def initialize(socket) @socket = socket end |
Class Method Details
.open(host, port) ⇒ Object
5 6 7 8 |
# File 'lib/capybara/driver/webkit/socket_debugger.rb', line 5 def self.open(host, port) real_socket = TCPSocket.open(host, port) new(real_socket) end |
Instance Method Details
#gets ⇒ Object
28 29 30 |
# File 'lib/capybara/driver/webkit/socket_debugger.rb', line 28 def gets received @socket.gets end |
#print(content) ⇒ Object
23 24 25 26 |
# File 'lib/capybara/driver/webkit/socket_debugger.rb', line 23 def print(content) sent content @socket.print(content) end |
#puts(line) ⇒ Object
18 19 20 21 |
# File 'lib/capybara/driver/webkit/socket_debugger.rb', line 18 def puts(line) sent line @socket.puts(line) end |
#read(length) ⇒ Object
14 15 16 |
# File 'lib/capybara/driver/webkit/socket_debugger.rb', line 14 def read(length) received @socket.read(length) end |