Class: Fairy::InputFile
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Filter
#backend, #backend=, #backend_class, #def_pool_variable
Constructor Details
#initialize(fairy, opts = nil) ⇒ InputFile
Returns a new instance of InputFile.
22
23
24
|
# File 'lib/fairy/client/input-file.rb', line 22
def initialize(fairy, opts=nil)
super
end
|
Class Method Details
18
19
20
|
# File 'lib/fairy/client/input-file.rb', line 18
def InputFile.input(fairy, opts, ffile_descripter)
InputFile.open(fairy, opts, ffile_descripter)
end
|
.open(fairy, opts, ffile_descripter) ⇒ Object
12
13
14
15
16
|
# File 'lib/fairy/client/input-file.rb', line 12
def InputFile.open(fairy, opts, ffile_descripter)
ffile = new(fairy, opts)
ffile.open(ffile_descripter)
ffile
end
|
Instance Method Details
#backend_class_name ⇒ Object
26
27
28
|
# File 'lib/fairy/client/input-file.rb', line 26
def backend_class_name
"CInputFile"
end
|
#open(ffile_descripter) ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/fairy/client/input-file.rb', line 30
def open(ffile_descripter)
@descripter = ffile_descripter
case ffile_descripter
when Array
vf = VFile.real_files(ffile_descripter)
when VFile
vf = ffile_descripter
when String
if VFile.vfile?(ffile_descripter)
vf = VFile.vfile(ffile_descripter)
else
vf = VFile.real_files([ffile_descripter])
end
else
ERR::Raise ERR::IllegalVFile
end
backend.open(vf)
self
end
|