Class: Lynx::Pipe::Write

Inherits:
Basic
  • Object
show all
Defined in:
lib/lynx/pipe/write.rb

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ Write

Returns a new instance of Write.



6
7
8
# File 'lib/lynx/pipe/write.rb', line 6

def initialize(file)
  @file = file
end

Instance Method Details

#clearObject



14
15
16
17
18
# File 'lib/lynx/pipe/write.rb', line 14

def clear
  system("rm -rf #{@file}")

  self
end

#perform(command) ⇒ Object



10
11
12
# File 'lib/lynx/pipe/write.rb', line 10

def perform(command)
  system("#{command} > #{@file}")
end