Class: ImageGenie::Verify

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, options = {}) ⇒ Verify

Returns a new instance of Verify.



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

def initialize(filename, options={})
  self.exception_class = VerifyError
  raise(UnableToLocateBinaryError, 'identify') if path_for(:identify).blank?
  self.filename = filename
  raise Errno::ENOENT,"#{filename}" unless File.exists?(filename)
  super(self)
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



7
8
9
# File 'lib/image_genie/verify.rb', line 7

def filename
  @filename
end

Instance Method Details

#runObject



17
18
19
20
# File 'lib/image_genie/verify.rb', line 17

def run
  execute("#{path_for(:identify)} #{filename}")
  return true      
end