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.



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

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

Instance Method Details

#flushObject



48
49
50
# File 'lib/virb/pry.rb', line 48

def flush
  @out.flush
end


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

def print s
  @out.print s
end

#puts(s) ⇒ Object



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

def puts s
  @out.puts s
end

#tty?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/virb/pry.rb', line 51

def tty?
  true
end

#write(s) ⇒ Object



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

def write s
  @out.write s
end