Module: Shrine::Plugins::Blurhash::InstanceMethods

Defined in:
lib/shrine/plugins/blurhash.rb

Instance Method Summary collapse

Instance Method Details

#extract_metadata(io, **options) ⇒ Object



92
93
94
95
96
97
# File 'lib/shrine/plugins/blurhash.rb', line 92

def (io, **options)
  return super unless self.class.opts[:blurhash][:auto_extraction]

  blurhash = self.class.compute_blurhash(io)
  super.merge!("blurhash" => blurhash)
end