Class: Shell::AppendFile
- Inherits:
-
AppendIO
- Object
- Filter
- BuiltInCommand
- AppendIO
- Shell::AppendFile
- Defined in:
- lib/shell/builtin-command.rb
Instance Attribute Summary
Attributes inherited from Filter
Instance Method Summary collapse
-
#initialize(sh, to_filename, filter) ⇒ AppendFile
constructor
A new instance of AppendFile.
- #input=(filter) ⇒ Object
Methods inherited from BuiltInCommand
Methods inherited from Filter
#+, #<, #>, #>>, #each, #inspect, #to_a, #to_s, #|
Constructor Details
#initialize(sh, to_filename, filter) ⇒ AppendFile
Returns a new instance of AppendFile.
117 118 119 120 121 |
# File 'lib/shell/builtin-command.rb', line 117 def initialize(sh, to_filename, filter) @file_name = to_filename io = sh.open(to_filename, "a") super(sh, io, filter) end |
Instance Method Details
#input=(filter) ⇒ Object
123 124 125 126 127 128 129 |
# File 'lib/shell/builtin-command.rb', line 123 def input=(filter) begin super ensure @io.close end end |