Class: ImageGenie::Verify
- Inherits:
-
Command
- Object
- Command
- ImageGenie::Verify
- Defined in:
- lib/image_genie/verify.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
Instance Method Summary collapse
-
#initialize(filename, options = {}) ⇒ Verify
constructor
A new instance of Verify.
- #run ⇒ Object
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, ={}) 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
#filename ⇒ Object
Returns the value of attribute filename.
7 8 9 |
# File 'lib/image_genie/verify.rb', line 7 def filename @filename end |
Instance Method Details
#run ⇒ Object
17 18 19 20 |
# File 'lib/image_genie/verify.rb', line 17 def run execute("#{path_for(:identify)} #{filename}") return true end |