class Thingfish::Processor::Image::MagickOperations
A struct that can represent the support in the installed ImageMagick for common operations. See Magick.formats for details.
Attributes
Supported features
Supported features
Supported features
Supported features
Supported features
Public Class Methods
Create a new MagickOperations
for the given ext
, reading the supported features of the format from support_string
.
# File lib/thingfish/processor/image.rb, line 212 def initialize( ext, support_string ) @ext = ext @blob, @read, @write, @multi = support_string.split('') end
Public Instance Methods
Returns true
if the operation string indicates that ImageMagick has native blob support for the associated type
# File lib/thingfish/processor/image.rb, line 242 def can_read? return (@read == 'r') end
Returns true
if the operation string indicates that ImageMagick has native blob support for the associated type
# File lib/thingfish/processor/image.rb, line 249 def can_write? return (@write == 'w') end
Returns true
if the operation string indicates that ImageMagick has native blob support for the associated type
# File lib/thingfish/processor/image.rb, line 235 def has_native_blob? return (@blob == '*') end
Returns true
if the operation string indicates that ImageMagick has native blob support for the associated type
# File lib/thingfish/processor/image.rb, line 256 def supports_multi? return (@multi == '+') end
Return a human-readable description of the operations spec
# File lib/thingfish/processor/image.rb, line 223 def to_s return [ self.has_native_blob? ? "Blob" : nil, self.can_read? ? "Readable" : nil, self.can_write? ? "Writable" : nil, self.supports_multi? ? "Multi" : nil, ].compact.join(',') end