Class: Lynx::Pipe::Append
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(file) ⇒ Append
constructor
A new instance of Append.
- #perform(command) ⇒ Object
Constructor Details
#initialize(file) ⇒ Append
Returns a new instance of Append.
6 7 8 |
# File 'lib/lynx/pipe/append.rb', line 6 def initialize(file) @file = file end |
Instance Method Details
#clear ⇒ Object
14 15 16 17 18 |
# File 'lib/lynx/pipe/append.rb', line 14 def clear system("rm -rf #{@file}") self end |
#perform(command) ⇒ Object
10 11 12 |
# File 'lib/lynx/pipe/append.rb', line 10 def perform(command) system("#{command} >> #{@file}") end |