Class: RSpec::Interactive::ClientOutput
- Inherits:
-
Object
- Object
- RSpec::Interactive::ClientOutput
- Defined in:
- lib/rspec-interactive/client_output.rb
Instance Method Summary collapse
- #close ⇒ Object
- #closed? ⇒ Boolean
- #flush ⇒ Object
-
#initialize(client) ⇒ ClientOutput
constructor
A new instance of ClientOutput.
- #print(str = "") ⇒ Object
- #puts(str = "") ⇒ Object
- #string ⇒ Object
- #sync ⇒ Object
- #sync=(sync) ⇒ Object
- #write(str = "") ⇒ Object
Constructor Details
#initialize(client) ⇒ ClientOutput
Returns a new instance of ClientOutput.
4 5 6 |
# File 'lib/rspec-interactive/client_output.rb', line 4 def initialize(client) @client = client end |
Instance Method Details
#close ⇒ Object
39 40 |
# File 'lib/rspec-interactive/client_output.rb', line 39 def close end |
#closed? ⇒ Boolean
23 24 25 |
# File 'lib/rspec-interactive/client_output.rb', line 23 def closed? @client.closed? end |
#flush ⇒ Object
20 21 |
# File 'lib/rspec-interactive/client_output.rb', line 20 def flush end |
#print(str = "") ⇒ Object
8 9 10 |
# File 'lib/rspec-interactive/client_output.rb', line 8 def print(str = "") @client.print(str.to_s) end |
#puts(str = "") ⇒ Object
16 17 18 |
# File 'lib/rspec-interactive/client_output.rb', line 16 def puts(str = "") @client.print(str.to_s + "\n") end |
#string ⇒ Object
27 28 29 |
# File 'lib/rspec-interactive/client_output.rb', line 27 def string @output end |
#sync ⇒ Object
31 32 33 |
# File 'lib/rspec-interactive/client_output.rb', line 31 def sync @sync || false end |
#sync=(sync) ⇒ Object
35 36 37 |
# File 'lib/rspec-interactive/client_output.rb', line 35 def sync=(sync) @sync = sync end |
#write(str = "") ⇒ Object
12 13 14 |
# File 'lib/rspec-interactive/client_output.rb', line 12 def write(str = "") @client.print(str.to_s) end |