module Shrine::Plugins::Versions::InstanceMethods

  1. lib/shrine/plugins/versions.rb

Methods

Public Instance

  1. uploaded?

Public Instance methods

uploaded? (object)

Checks whether all versions are uploaded by this uploader.

[show source]
# File lib/shrine/plugins/versions.rb, line 195
def uploaded?(object)
  if object.is_a?(Hash)
    object.all? { |name, version| uploaded?(version) }
  elsif object.is_a?(Array)
    object.all? { |version| uploaded?(version) }
  else
    super
  end
end