Class: RSpec::Interactive::ClientOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec-interactive/client_output.rb

Instance Method Summary collapse

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

#closeObject



39
40
# File 'lib/rspec-interactive/client_output.rb', line 39

def close
end

#closed?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/rspec-interactive/client_output.rb', line 23

def closed?
  @client.closed?
end

#flushObject



20
21
# File 'lib/rspec-interactive/client_output.rb', line 20

def flush
end


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

#stringObject



27
28
29
# File 'lib/rspec-interactive/client_output.rb', line 27

def string
  @output
end

#syncObject



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