Class: OutputBuffer
- Inherits:
-
Object
- Object
- OutputBuffer
- Defined in:
- lib/script_executor/output_buffer.rb
Instance Attribute Summary collapse
-
#buffer ⇒ Object
readonly
Returns the value of attribute buffer.
Instance Method Summary collapse
-
#initialize ⇒ OutputBuffer
constructor
A new instance of OutputBuffer.
- #save(line) ⇒ Object
Constructor Details
#initialize ⇒ OutputBuffer
Returns a new instance of OutputBuffer.
4 5 6 |
# File 'lib/script_executor/output_buffer.rb', line 4 def initialize @buffer = [] end |
Instance Attribute Details
#buffer ⇒ Object (readonly)
Returns the value of attribute buffer.
2 3 4 |
# File 'lib/script_executor/output_buffer.rb', line 2 def buffer @buffer end |
Instance Method Details
#save(line) ⇒ Object
8 9 10 |
# File 'lib/script_executor/output_buffer.rb', line 8 def save(line) buffer << line end |