Class: ActiveStorageValidations::Analyzer::ImageAnalyzer::ImageMagick::ImageInfo
- Inherits:
-
Struct
- Object
- Struct
- ActiveStorageValidations::Analyzer::ImageAnalyzer::ImageMagick::ImageInfo
- Defined in:
- lib/active_storage_validations/analyzer/image_analyzer/image_magick.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#orientation ⇒ Object
Returns the value of attribute orientation.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height
10 11 12 |
# File 'lib/active_storage_validations/analyzer/image_analyzer/image_magick.rb', line 10 def height @height end |
#orientation ⇒ Object
Returns the value of attribute orientation
10 11 12 |
# File 'lib/active_storage_validations/analyzer/image_analyzer/image_magick.rb', line 10 def orientation @orientation end |
#width ⇒ Object
Returns the value of attribute width
10 11 12 |
# File 'lib/active_storage_validations/analyzer/image_analyzer/image_magick.rb', line 10 def width @width end |
Instance Method Details
#[](key) ⇒ Object
15 16 17 |
# File 'lib/active_storage_validations/analyzer/image_analyzer/image_magick.rb', line 15 def [](key) orientation if key == "%[orientation]" end |
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/active_storage_validations/analyzer/image_analyzer/image_magick.rb', line 11 def valid? width.to_i.positive? && height.to_i.positive? end |