Class: Sprout::OutputBuffer
- Inherits:
-
String
- Object
- String
- Sprout::OutputBuffer
- Defined in:
- lib/sprout/output_buffer.rb
Instance Method Summary (collapse)
- - (Object) flush
-
- (OutputBuffer) initialize(*args)
constructor
A new instance of OutputBuffer.
- - (Object) print(msg)
- - (Object) printf(msg)
- - (Object) puts(msg)
- - (Object) read
Methods inherited from String
#camel_case, #dash_case, #snake_case
Constructor Details
- (OutputBuffer) initialize(*args)
A new instance of OutputBuffer
6 7 8 9 |
# File 'lib/sprout/output_buffer.rb', line 6 def initialize *args super @characters = '' end |
Instance Method Details
- (Object) flush
29 30 |
# File 'lib/sprout/output_buffer.rb', line 29 def flush end |
- (Object) print(msg)
15 16 17 |
# File 'lib/sprout/output_buffer.rb', line 15 def print msg @characters << msg end |
- (Object) printf(msg)
19 20 21 |
# File 'lib/sprout/output_buffer.rb', line 19 def printf msg @characters << msg end |
- (Object) puts(msg)
11 12 13 |
# File 'lib/sprout/output_buffer.rb', line 11 def puts msg @characters << msg end |
- (Object) read
23 24 25 26 27 |
# File 'lib/sprout/output_buffer.rb', line 23 def read response = @characters @characters = '' response end |