Class: Virb::Pry::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/virb/pry.rb

Overview

fakes a tty stdout

Instance Method Summary collapse

Constructor Details

#initializeOutput

Returns a new instance of Output.



28
29
30
31
# File 'lib/virb/pry.rb', line 28

def initialize
  @out = File.open(".virb/session", "w")
  @out.sync = true
end

Instance Method Details

#flushObject



41
42
43
# File 'lib/virb/pry.rb', line 41

def flush
  @out.flush
end


32
33
34
# File 'lib/virb/pry.rb', line 32

def print s
  @out.print s
end

#puts(s) ⇒ Object



35
36
37
# File 'lib/virb/pry.rb', line 35

def puts s
  @out.puts s
end

#tty?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/virb/pry.rb', line 44

def tty?
  true
end

#write(s) ⇒ Object



38
39
40
# File 'lib/virb/pry.rb', line 38

def write s
  @out.write s
end