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.
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
#flush ⇒ Object
48 49 50 |
# File 'lib/virb/pry.rb', line 48 def flush @out.flush end |
#print(s) ⇒ Object
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
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 |