Class: Fairy::OutputLocalFile
- Inherits:
-
Here
show all
- Defined in:
- lib/fairy/client/output-local-file.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Here
#each, #each_with_bjobeach, #to_a
Methods inherited from Filter
#backend, #backend=, #backend_class, #def_pool_variable
Constructor Details
#initialize(fairy, opts = nil) ⇒ OutputLocalFile
Returns a new instance of OutputLocalFile.
19
20
21
22
|
# File 'lib/fairy/client/output-local-file.rb', line 19
def initialize(fairy, opts=nil)
super
@filename = nil
end
|
Class Method Details
.output(fairy, opts, filename) ⇒ Object
13
14
15
16
17
|
# File 'lib/fairy/client/output-local-file.rb', line 13
def OutputLocalFile.output(fairy, opts, filename)
ffile = new(fairy, opts)
ffile.output(filename)
ffile
end
|
Instance Method Details
#backend_class_name ⇒ Object
24
25
26
|
# File 'lib/fairy/client/output-local-file.rb', line 24
def backend_class_name
"COutputLocalFile"
end
|
33
34
35
36
37
38
39
40
41
|
# File 'lib/fairy/client/output-local-file.rb', line 33
def input=(job)
super
File.open(@filename, "w") do |io|
each do |e|
io.puts e
end
end
end
|
#output(filename) ⇒ Object
28
29
30
31
|
# File 'lib/fairy/client/output-local-file.rb', line 28
def output(filename)
@filename = filename
end
|