Class: ImageGenie::Test

Inherits:
Command
  • Object
show all
Defined in:
lib/image_genie/test.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Test

Returns a new instance of Test.



26
27
28
29
30
31
32
# File 'lib/image_genie/test.rb', line 26

def initialize(options={})
  self.exception_class = TestError
  # Dir.chdir(Dir::tmpdir)
  # # Create a temp file that will be all component files of this montage
  # self.temp_image_file = Tempfile.new(['montage','.jpg'])
  # self.temp_image_list_file = Tempfile.new(['montage_image_filenames','.txt']) 
end

Instance Attribute Details

#temp_image_fileObject

Returns the value of attribute temp_image_file.



4
5
6
# File 'lib/image_genie/test.rb', line 4

def temp_image_file
  @temp_image_file
end

#temp_image_list_fileObject

Returns the value of attribute temp_image_list_file.



4
5
6
# File 'lib/image_genie/test.rb', line 4

def temp_image_list_file
  @temp_image_list_file
end

Instance Method Details

#errorObject



18
19
20
21
22
23
24
# File 'lib/image_genie/test.rb', line 18

def error
  if has_error?
    errors = stderr.read.strip
#        logger.error("#{self.name} #{errors}")
    raise(exception_class, errors)        
  end
end

#inputObject



6
7
# File 'lib/image_genie/test.rb', line 6

def input
end

#outputObject



9
10
11
12
13
14
15
# File 'lib/image_genie/test.rb', line 9

def output
  while !stdout.eof?
    puts stdout.readline
#        self.temp_image_file.puts stdout.readline
  end
#      temp_image_file.rewind
end

#runObject



34
35
36
# File 'lib/image_genie/test.rb', line 34

def run
  execute("ls WERIOWEK",self)
end