Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- lib/logmerge.rb
Instance Method Summary collapse
- #buf ⇒ Object
-
#initialize(*args) ⇒ File
constructor
A new instance of File.
- #old_initialize ⇒ Object
- #old_readline ⇒ Object
- #readline(*args) ⇒ Object
- #unreadline(str) ⇒ Object
Constructor Details
#initialize(*args) ⇒ File
Returns a new instance of File.
21 22 23 24 |
# File 'lib/logmerge.rb', line 21 def initialize (*args) @buf=[] old_initialize(*args) end |
Instance Method Details
#buf ⇒ Object
32 33 34 |
# File 'lib/logmerge.rb', line 32 def buf @buf end |
#old_initialize ⇒ Object
19 |
# File 'lib/logmerge.rb', line 19 alias :old_initialize :initialize |
#old_readline ⇒ Object
20 |
# File 'lib/logmerge.rb', line 20 alias :old_readline :readline |
#readline(*args) ⇒ Object
28 29 30 |
# File 'lib/logmerge.rb', line 28 def readline (*args) @buf.empty? ? old_readline(*args) : @buf.pop end |
#unreadline(str) ⇒ Object
25 26 27 |
# File 'lib/logmerge.rb', line 25 def unreadline (str) @buf.push(str) end |