Class: DragonflyLibvips::Dimensions
- Inherits:
-
Struct
- Object
- Struct
- DragonflyLibvips::Dimensions
- Defined in:
- lib/dragonfly_libvips/dimensions.rb
Instance Attribute Summary collapse
-
#geometry ⇒ Object
Returns the value of attribute geometry.
-
#orig_h ⇒ Object
Returns the value of attribute orig_h.
-
#orig_w ⇒ Object
Returns the value of attribute orig_w.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#geometry ⇒ Object
Returns the value of attribute geometry
2 3 4 |
# File 'lib/dragonfly_libvips/dimensions.rb', line 2 def geometry @geometry end |
#orig_h ⇒ Object
Returns the value of attribute orig_h
2 3 4 |
# File 'lib/dragonfly_libvips/dimensions.rb', line 2 def orig_h @orig_h end |
#orig_w ⇒ Object
Returns the value of attribute orig_w
2 3 4 |
# File 'lib/dragonfly_libvips/dimensions.rb', line 2 def orig_w @orig_w end |
Class Method Details
.call(*args) ⇒ Object
3 4 5 |
# File 'lib/dragonfly_libvips/dimensions.rb', line 3 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
7 8 9 10 |
# File 'lib/dragonfly_libvips/dimensions.rb', line 7 def call return OpenStruct.new(width: orig_w, height: orig_h, scale: 1) if do_not_resize_if_image_smaller_than_requested? || do_not_resize_if_image_larger_than_requested? OpenStruct.new(width: width, height: height, scale: scale) end |