module Shrine::Plugins::StoreDimensions::InstanceMethods

  1. lib/shrine/plugins/store_dimensions.rb

Methods

Public Instance

  1. extract_metadata

Public Instance methods

extract_metadata (io, context)

We update the metadata with “width” and “height”.

[show source]
# File lib/shrine/plugins/store_dimensions.rb, line 76
def extract_metadata(io, context)
  width, height = extract_dimensions(io)

  super.update(
    "width"  => width,
    "height" => height,
  )
end