Class: Virb::Pry::Output
- Inherits:
-
Object
- Object
- Virb::Pry::Output
- Defined in:
- lib/virb/pry.rb
Overview
fakes a tty stdout
Instance Method Summary collapse
- #flush ⇒ Object
-
#initialize ⇒ Output
constructor
A new instance of Output.
- #print(s) ⇒ Object
- #puts(s) ⇒ Object
- #tty? ⇒ Boolean
- #write(s) ⇒ Object
Constructor Details
#initialize ⇒ Output
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
#flush ⇒ Object
41 42 43 |
# File 'lib/virb/pry.rb', line 41 def flush @out.flush end |
#print(s) ⇒ Object
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
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 |