Arie/serveme

View on GitHub
sorbet/rbi/gems/activestorage@7.0.5.rbi

Summary

Maintainability
Test Coverage
# typed: true

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `activestorage` gem.
# Please instead update this file by running `bin/tapioca gem activestorage`.

# source://activestorage//lib/active_storage/gem_version.rb#3
module ActiveStorage
  extend ::ActiveSupport::Autoload

  # source://activestorage//lib/active_storage.rb#52
  def analyzers; end

  # source://activestorage//lib/active_storage.rb#52
  def analyzers=(val); end

  # source://activestorage//lib/active_storage.rb#58
  def binary_content_type; end

  # source://activestorage//lib/active_storage.rb#58
  def binary_content_type=(val); end

  # source://activestorage//lib/active_storage.rb#60
  def content_types_allowed_inline; end

  # source://activestorage//lib/active_storage.rb#60
  def content_types_allowed_inline=(val); end

  # source://activestorage//lib/active_storage.rb#59
  def content_types_to_serve_as_binary; end

  # source://activestorage//lib/active_storage.rb#59
  def content_types_to_serve_as_binary=(val); end

  # source://activestorage//lib/active_storage.rb#357
  def draw_routes; end

  # source://activestorage//lib/active_storage.rb#357
  def draw_routes=(val); end

  # source://activestorage//lib/active_storage.rb#45
  def logger; end

  # source://activestorage//lib/active_storage.rb#45
  def logger=(val); end

  # source://activestorage//lib/active_storage.rb#54
  def paths; end

  # source://activestorage//lib/active_storage.rb#54
  def paths=(val); end

  # source://activestorage//lib/active_storage.rb#51
  def previewers; end

  # source://activestorage//lib/active_storage.rb#51
  def previewers=(val); end

  # source://activestorage//lib/active_storage.rb#49
  def queues; end

  # source://activestorage//lib/active_storage.rb#49
  def queues=(val); end

  # source://activestorage//lib/active_storage.rb#360
  def replace_on_assign_to_many; end

  # source://activestorage//lib/active_storage.rb#360
  def replace_on_assign_to_many=(val); end

  # source://activestorage//lib/active_storage.rb#358
  def resolve_model_to_route; end

  # source://activestorage//lib/active_storage.rb#358
  def resolve_model_to_route=(val); end

  # source://activestorage//lib/active_storage.rb#356
  def routes_prefix; end

  # source://activestorage//lib/active_storage.rb#356
  def routes_prefix=(val); end

  # source://activestorage//lib/active_storage.rb#353
  def service_urls_expire_in; end

  # source://activestorage//lib/active_storage.rb#353
  def service_urls_expire_in=(val); end

  # source://activestorage//lib/active_storage.rb#365
  def silence_invalid_content_types_warning; end

  # source://activestorage//lib/active_storage.rb#365
  def silence_invalid_content_types_warning=(val); end

  # source://activestorage//lib/active_storage.rb#62
  def supported_image_processing_methods; end

  # source://activestorage//lib/active_storage.rb#62
  def supported_image_processing_methods=(val); end

  # source://activestorage//lib/active_storage.rb#361
  def track_variants; end

  # source://activestorage//lib/active_storage.rb#361
  def track_variants=(val); end

  # source://activestorage//lib/active_storage.rb#351
  def unsupported_image_processing_arguments; end

  # source://activestorage//lib/active_storage.rb#351
  def unsupported_image_processing_arguments=(val); end

  # source://activestorage//lib/active_storage.rb#354
  def urls_expire_in; end

  # source://activestorage//lib/active_storage.rb#354
  def urls_expire_in=(val); end

  # source://activestorage//lib/active_storage.rb#56
  def variable_content_types; end

  # source://activestorage//lib/active_storage.rb#56
  def variable_content_types=(val); end

  # source://activestorage//lib/active_storage.rb#47
  def variant_processor; end

  # source://activestorage//lib/active_storage.rb#47
  def variant_processor=(val); end

  # source://activestorage//lib/active_storage.rb#46
  def verifier; end

  # source://activestorage//lib/active_storage.rb#46
  def verifier=(val); end

  # source://activestorage//lib/active_storage.rb#363
  def video_preview_arguments; end

  # source://activestorage//lib/active_storage.rb#363
  def video_preview_arguments=(val); end

  # source://activestorage//lib/active_storage.rb#57
  def web_image_content_types; end

  # source://activestorage//lib/active_storage.rb#57
  def web_image_content_types=(val); end

  class << self
    # source://activestorage//lib/active_storage.rb#52
    def analyzers; end

    # source://activestorage//lib/active_storage.rb#52
    def analyzers=(val); end

    # source://activestorage//lib/active_storage.rb#58
    def binary_content_type; end

    # source://activestorage//lib/active_storage.rb#58
    def binary_content_type=(val); end

    # source://activestorage//lib/active_storage.rb#60
    def content_types_allowed_inline; end

    # source://activestorage//lib/active_storage.rb#60
    def content_types_allowed_inline=(val); end

    # source://activestorage//lib/active_storage.rb#59
    def content_types_to_serve_as_binary; end

    # source://activestorage//lib/active_storage.rb#59
    def content_types_to_serve_as_binary=(val); end

    # source://activestorage//lib/active_storage.rb#357
    def draw_routes; end

    # source://activestorage//lib/active_storage.rb#357
    def draw_routes=(val); end

    # Returns the currently loaded version of Active Storage as a <tt>Gem::Version</tt>.
    #
    # source://activestorage//lib/active_storage/gem_version.rb#5
    def gem_version; end

    # source://activestorage//lib/active_storage.rb#45
    def logger; end

    # source://activestorage//lib/active_storage.rb#45
    def logger=(val); end

    # source://activestorage//lib/active_storage.rb#54
    def paths; end

    # source://activestorage//lib/active_storage.rb#54
    def paths=(val); end

    # source://activestorage//lib/active_storage.rb#51
    def previewers; end

    # source://activestorage//lib/active_storage.rb#51
    def previewers=(val); end

    # source://activestorage//lib/active_storage.rb#49
    def queues; end

    # source://activestorage//lib/active_storage.rb#49
    def queues=(val); end

    # source://railties/7.0.5/lib/rails/engine.rb#405
    def railtie_helpers_paths; end

    # source://railties/7.0.5/lib/rails/engine.rb#394
    def railtie_namespace; end

    # source://railties/7.0.5/lib/rails/engine.rb#409
    def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end

    # source://activestorage//lib/active_storage.rb#360
    def replace_on_assign_to_many; end

    # source://activestorage//lib/active_storage.rb#360
    def replace_on_assign_to_many=(val); end

    # source://activestorage//lib/active_storage.rb#358
    def resolve_model_to_route; end

    # source://activestorage//lib/active_storage.rb#358
    def resolve_model_to_route=(val); end

    # source://activestorage//lib/active_storage.rb#356
    def routes_prefix; end

    # source://activestorage//lib/active_storage.rb#356
    def routes_prefix=(val); end

    # source://activestorage//lib/active_storage.rb#353
    def service_urls_expire_in; end

    # source://activestorage//lib/active_storage.rb#353
    def service_urls_expire_in=(val); end

    # source://activestorage//lib/active_storage.rb#365
    def silence_invalid_content_types_warning; end

    # source://activestorage//lib/active_storage.rb#365
    def silence_invalid_content_types_warning=(val); end

    # source://activestorage//lib/active_storage.rb#62
    def supported_image_processing_methods; end

    # source://activestorage//lib/active_storage.rb#62
    def supported_image_processing_methods=(val); end

    # source://railties/7.0.5/lib/rails/engine.rb#397
    def table_name_prefix; end

    # source://activestorage//lib/active_storage.rb#361
    def track_variants; end

    # source://activestorage//lib/active_storage.rb#361
    def track_variants=(val); end

    # source://activestorage//lib/active_storage.rb#351
    def unsupported_image_processing_arguments; end

    # source://activestorage//lib/active_storage.rb#351
    def unsupported_image_processing_arguments=(val); end

    # source://activestorage//lib/active_storage.rb#354
    def urls_expire_in; end

    # source://activestorage//lib/active_storage.rb#354
    def urls_expire_in=(val); end

    # source://railties/7.0.5/lib/rails/engine.rb#401
    def use_relative_model_naming?; end

    # source://activestorage//lib/active_storage.rb#56
    def variable_content_types; end

    # source://activestorage//lib/active_storage.rb#56
    def variable_content_types=(val); end

    # source://activestorage//lib/active_storage.rb#47
    def variant_processor; end

    # source://activestorage//lib/active_storage.rb#47
    def variant_processor=(val); end

    # source://activestorage//lib/active_storage.rb#46
    def verifier; end

    # source://activestorage//lib/active_storage.rb#46
    def verifier=(val); end

    # Returns the currently loaded version of Active Storage as a <tt>Gem::Version</tt>.
    #
    # source://activestorage//lib/active_storage/version.rb#7
    def version; end

    # source://activestorage//lib/active_storage.rb#363
    def video_preview_arguments; end

    # source://activestorage//lib/active_storage.rb#363
    def video_preview_arguments=(val); end

    # source://activestorage//lib/active_storage.rb#57
    def web_image_content_types; end

    # source://activestorage//lib/active_storage.rb#57
    def web_image_content_types=(val); end
  end
end

class ActiveStorage::AnalyzeJob < ::ActiveStorage::BaseJob
  def perform(blob); end

  class << self
    # source://activejob/7.0.5/lib/active_job/queue_name.rb#56
    def queue_name; end

    # source://activesupport/7.0.5/lib/active_support/rescuable.rb#13
    def rescue_handlers; end
  end
end

# This is an abstract base class for analyzers, which extract metadata from blobs. See
# ActiveStorage::Analyzer::VideoAnalyzer for an example of a concrete subclass.
#
# source://activestorage//lib/active_storage/analyzer.rb#6
class ActiveStorage::Analyzer
  # @return [Analyzer] a new instance of Analyzer
  #
  # source://activestorage//lib/active_storage/analyzer.rb#21
  def initialize(blob); end

  # Returns the value of attribute blob.
  #
  # source://activestorage//lib/active_storage/analyzer.rb#7
  def blob; end

  # Override this method in a concrete subclass. Have it return a Hash of metadata.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/analyzer.rb#26
  def metadata; end

  private

  # Downloads the blob to a tempfile on disk. Yields the tempfile.
  #
  # source://activestorage//lib/active_storage/analyzer.rb#32
  def download_blob_to_tempfile(&block); end

  # source://activestorage//lib/active_storage/analyzer.rb#44
  def instrument(analyzer, &block); end

  # source://activestorage//lib/active_storage/analyzer.rb#36
  def logger; end

  # source://activestorage//lib/active_storage/analyzer.rb#40
  def tmpdir; end

  class << self
    # Implement this method in a concrete subclass. Have it return true when given a blob from which
    # the analyzer can extract metadata.
    #
    # @return [Boolean]
    #
    # source://activestorage//lib/active_storage/analyzer.rb#11
    def accept?(blob); end

    # Implement this method in concrete subclasses. It will determine if blob analysis
    # should be done in a job or performed inline. By default, analysis is enqueued in a job.
    #
    # @return [Boolean]
    #
    # source://activestorage//lib/active_storage/analyzer.rb#17
    def analyze_later?; end
  end
end

# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#12
class ActiveStorage::Analyzer::AudioAnalyzer < ::ActiveStorage::Analyzer
  # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#17
  def metadata; end

  private

  # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#32
  def audio_stream; end

  # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#27
  def bit_rate; end

  # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#22
  def duration; end

  # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#61
  def ffprobe_path; end

  # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#40
  def probe; end

  # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#44
  def probe_from(file); end

  # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#36
  def streams; end

  class << self
    # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#13
    def accept?(blob); end
  end
end

# source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#12
class ActiveStorage::Analyzer::ImageAnalyzer < ::ActiveStorage::Analyzer
  # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#17
  def metadata; end

  class << self
    # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#13
    def accept?(blob); end
  end
end

# source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#6
class ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick < ::ActiveStorage::Analyzer::ImageAnalyzer
  private

  # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#12
  def read_image; end

  # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#37
  def rotated_image?(image); end

  class << self
    # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#7
    def accept?(blob); end
  end
end

# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#6
class ActiveStorage::Analyzer::ImageAnalyzer::Vips < ::ActiveStorage::Analyzer::ImageAnalyzer
  private

  # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#12
  def read_image; end

  # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#38
  def rotated_image?(image); end

  # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#44
  def valid_image?(image); end

  class << self
    # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#7
    def accept?(blob); end
  end
end

# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#37
ActiveStorage::Analyzer::ImageAnalyzer::Vips::ROTATIONS = T.let(T.unsafe(nil), Regexp)

# source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#4
class ActiveStorage::Analyzer::NullAnalyzer < ::ActiveStorage::Analyzer
  # source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#13
  def metadata; end

  class << self
    # source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#5
    def accept?(blob); end

    # source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#9
    def analyze_later?; end
  end
end

# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#22
class ActiveStorage::Analyzer::VideoAnalyzer < ::ActiveStorage::Analyzer
  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#27
  def metadata; end

  private

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#53
  def angle; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#72
  def audio?; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#107
  def audio_stream; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#80
  def computed_height; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#115
  def container; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#57
  def display_aspect_ratio; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#94
  def display_height_scale; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#48
  def duration; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#90
  def encoded_height; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#86
  def encoded_width; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#140
  def ffprobe_path; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#40
  def height; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#119
  def probe; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#123
  def probe_from(file); end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#68
  def rotated?; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#111
  def streams; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#99
  def tags; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#76
  def video?; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#103
  def video_stream; end

  # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#32
  def width; end

  class << self
    # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#23
    def accept?(blob); end
  end
end

# Abstract base class for the concrete ActiveStorage::Attached::One and ActiveStorage::Attached::Many
# classes that both provide proxy access to the blob association for a record.
#
# source://activestorage//lib/active_storage/attached.rb#8
class ActiveStorage::Attached
  # @return [Attached] a new instance of Attached
  #
  # source://activestorage//lib/active_storage/attached.rb#11
  def initialize(name, record); end

  # Returns the value of attribute name.
  #
  # source://activestorage//lib/active_storage/attached.rb#9
  def name; end

  # Returns the value of attribute record.
  #
  # source://activestorage//lib/active_storage/attached.rb#9
  def record; end

  private

  # source://activestorage//lib/active_storage/attached.rb#16
  def change; end
end

# source://activestorage//lib/active_storage/attached/changes.rb#4
module ActiveStorage::Attached::Changes
  extend ::ActiveSupport::Autoload
end

# source://activestorage//lib/active_storage/attached/changes/create_many.rb#4
class ActiveStorage::Attached::Changes::CreateMany
  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#7
  def initialize(name, record, attachables); end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5
  def attachables; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#13
  def attachments; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#17
  def blobs; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5
  def name; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5
  def record; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#25
  def save; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#21
  def upload; end

  private

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#39
  def assign_associated_attachments; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#35
  def build_subchange_from(attachable); end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#47
  def persisted_or_new_attachments; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#43
  def reset_associated_blobs; end

  # source://activestorage//lib/active_storage/attached/changes/create_many.rb#31
  def subchanges; end
end

# source://activestorage//lib/active_storage/attached/changes/create_one.rb#7
class ActiveStorage::Attached::Changes::CreateOne
  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#10
  def initialize(name, record, attachable); end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8
  def attachable; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#15
  def attachment; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#19
  def blob; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8
  def name; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8
  def record; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#32
  def save; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#23
  def upload; end

  private

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#78
  def attachment_service_name; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#48
  def build_attachment; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#42
  def find_attachment; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#38
  def find_or_build_attachment; end

  # source://activestorage//lib/active_storage/attached/changes/create_one.rb#52
  def find_or_build_blob; end
end

# source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#4
class ActiveStorage::Attached::Changes::CreateOneOfMany < ::ActiveStorage::Attached::Changes::CreateOne
  private

  # source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#6
  def find_attachment; end
end

# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#4
class ActiveStorage::Attached::Changes::DeleteMany
  # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#7
  def initialize(name, record); end

  # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#11
  def attachables; end

  # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#15
  def attachments; end

  # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#19
  def blobs; end

  # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5
  def name; end

  # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5
  def record; end

  # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#23
  def save; end
end

# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#4
class ActiveStorage::Attached::Changes::DeleteOne
  # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#7
  def initialize(name, record); end

  # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#11
  def attachment; end

  # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5
  def name; end

  # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5
  def record; end

  # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#15
  def save; end
end

# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#4
class ActiveStorage::Attached::Changes::DetachMany
  # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#7
  def initialize(name, record, attachments); end

  # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5
  def attachments; end

  # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#11
  def detach; end

  # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5
  def name; end

  # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5
  def record; end
end

# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#4
class ActiveStorage::Attached::Changes::DetachOne
  # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#7
  def initialize(name, record, attachment); end

  # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5
  def attachment; end

  # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#11
  def detach; end

  # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5
  def name; end

  # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5
  def record; end

  private

  # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#19
  def reset; end
end

# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#4
class ActiveStorage::Attached::Changes::PurgeMany
  # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#7
  def initialize(name, record, attachments); end

  # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5
  def attachments; end

  # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5
  def name; end

  # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#11
  def purge; end

  # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#16
  def purge_later; end

  # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5
  def record; end

  private

  # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#22
  def reset; end
end

# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#4
class ActiveStorage::Attached::Changes::PurgeOne
  # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#7
  def initialize(name, record, attachment); end

  # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5
  def attachment; end

  # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5
  def name; end

  # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#11
  def purge; end

  # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#16
  def purge_later; end

  # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5
  def record; end

  private

  # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#22
  def reset; end
end

# source://activestorage//lib/active_storage/attached/many.rb#5
class ActiveStorage::Attached::Many < ::ActiveStorage::Attached
  # source://activestorage//lib/active_storage/attached/many.rb#49
  def attach(*attachables); end

  # source://activestorage//lib/active_storage/attached/many.rb#65
  def attached?; end

  # source://activestorage//lib/active_storage/attached/many.rb#30
  def attachments; end

  # source://activestorage//lib/active_storage/attached/many.rb#35
  def blobs; end

  # source://activestorage//lib/active_storage/attached/many.rb#23
  def detach(*_arg0, **_arg1, &_arg2); end

  # source://activesupport/7.0.5/lib/active_support/core_ext/module/delegation.rb#302
  def method_missing(method, *args, **_arg2, &block); end

  # source://activestorage//lib/active_storage/attached/many.rb#11
  def purge(*_arg0, **_arg1, &_arg2); end

  # source://activestorage//lib/active_storage/attached/many.rb#17
  def purge_later(*_arg0, **_arg1, &_arg2); end

  private

  # source://activestorage//lib/active_storage/attached/many.rb#74
  def detach_many; end

  # source://activestorage//lib/active_storage/attached/many.rb#70
  def purge_many; end

  # source://activesupport/7.0.5/lib/active_support/core_ext/module/delegation.rb#294
  def respond_to_missing?(name, include_private = T.unsafe(nil)); end
end

# source://activestorage//lib/active_storage/attached/model.rb#7
module ActiveStorage::Attached::Model
  extend ::ActiveSupport::Concern

  mixes_in_class_methods ::ActiveStorage::Attached::Model::ClassMethods

  # source://activestorage//lib/active_storage/attached/model.rb#222
  def attachment_changes; end

  # source://activestorage//lib/active_storage/attached/model.rb#226
  def changed_for_autosave?; end

  # source://activestorage//lib/active_storage/attached/model.rb#236
  def reload(*_arg0); end

  private

  # source://activestorage//lib/active_storage/attached/model.rb#230
  def initialize_dup(*_arg0); end
end

# source://activestorage//lib/active_storage/attached/model.rb#0
module ActiveStorage::Attached::Model::ClassMethods
  # source://activestorage//lib/active_storage/attached/model.rb#129
  def has_many_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end

  # source://activestorage//lib/active_storage/attached/model.rb#50
  def has_one_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end

  private

  # source://activestorage//lib/active_storage/attached/model.rb#213
  def validate_service_configuration(association_name, service); end
end

# source://activestorage//lib/active_storage/attached/one.rb#5
class ActiveStorage::Attached::One < ::ActiveStorage::Attached
  # source://activestorage//lib/active_storage/attached/one.rb#56
  def attach(attachable); end

  # source://activestorage//lib/active_storage/attached/one.rb#72
  def attached?; end

  # source://activestorage//lib/active_storage/attached/one.rb#31
  def attachment; end

  # source://activestorage//lib/active_storage/attached/one.rb#42
  def blank?; end

  # source://activestorage//lib/active_storage/attached/one.rb#23
  def detach(*_arg0, **_arg1, &_arg2); end

  # source://activesupport/7.0.5/lib/active_support/core_ext/module/delegation.rb#302
  def method_missing(method, *args, **_arg2, &block); end

  # source://activestorage//lib/active_storage/attached/one.rb#11
  def purge(*_arg0, **_arg1, &_arg2); end

  # source://activestorage//lib/active_storage/attached/one.rb#17
  def purge_later(*_arg0, **_arg1, &_arg2); end

  private

  # source://activestorage//lib/active_storage/attached/one.rb#81
  def detach_one; end

  # source://activestorage//lib/active_storage/attached/one.rb#77
  def purge_one; end

  # source://activesupport/7.0.5/lib/active_support/core_ext/module/delegation.rb#294
  def respond_to_missing?(name, include_private = T.unsafe(nil)); end
end

class ActiveStorage::Attachment < ::ActiveStorage::Record
  include ::ActiveStorage::Attachment::GeneratedAttributeMethods
  include ::ActiveStorage::Attachment::GeneratedAssociationMethods

  # source://activerecord/7.0.5/lib/active_record/autosave_association.rb#160
  def autosave_associated_records_for_blob(*args); end

  # source://activerecord/7.0.5/lib/active_record/autosave_association.rb#160
  def autosave_associated_records_for_record(*args); end

  # source://activesupport/7.0.5/lib/active_support/core_ext/module/delegation.rb#302
  def method_missing(method, *args, **_arg2, &block); end

  def purge; end
  def purge_later; end
  def signed_id(*_arg0, **_arg1, &_arg2); end

  # source://activerecord/7.0.5/lib/active_record/autosave_association.rb#160
  def validate_associated_records_for_blob(*args); end

  def variant(transformations); end

  private

  def analyze_blob_later; end
  def dependent; end
  def mirror_blob_later; end
  def purge_dependent_blob_later; end

  # source://activesupport/7.0.5/lib/active_support/core_ext/module/delegation.rb#294
  def respond_to_missing?(name, include_private = T.unsafe(nil)); end

  def variants; end

  class << self
    # source://activesupport/7.0.5/lib/active_support/callbacks.rb#68
    def __callbacks; end

    # source://activerecord/7.0.5/lib/active_record/reflection.rb#11
    def _reflections; end

    # source://activemodel/7.0.5/lib/active_model/validations.rb#52
    def _validators; end

    # source://activerecord/7.0.5/lib/active_record/enum.rb#116
    def defined_enums; end

    # source://activerecord/7.0.5/lib/active_record/scoping/named.rb#174
    def with_all_variant_records(*args, **_arg1); end
  end
end

module ActiveStorage::Attachment::GeneratedAssociationMethods
  # source://activerecord/7.0.5/lib/active_record/associations/builder/association.rb#103
  def blob; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/association.rb#111
  def blob=(value); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/belongs_to.rb#132
  def blob_changed?; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/belongs_to.rb#136
  def blob_previously_changed?; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#28
  def build_blob(*args, &block); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#32
  def create_blob(*args, &block); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#36
  def create_blob!(*args, &block); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/association.rb#103
  def record; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/association.rb#111
  def record=(value); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/belongs_to.rb#132
  def record_changed?; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/belongs_to.rb#136
  def record_previously_changed?; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#19
  def reload_blob; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#19
  def reload_record; end
end

module ActiveStorage::Attachment::GeneratedAttributeMethods; end

class ActiveStorage::BaseController < ::ActionController::Base
  include ::ActiveStorage::SetCurrent

  private

  # source://actionview/7.0.5/lib/action_view/layouts.rb#328
  def _layout(lookup_context, formats); end

  class << self
    # source://activesupport/7.0.5/lib/active_support/callbacks.rb#68
    def __callbacks; end

    # source://actionpack/7.0.5/lib/action_controller/metal/etag_with_template_digest.rb#27
    def etag_with_template_digest; end

    # source://actionpack/7.0.5/lib/action_controller/metal.rb#210
    def middleware_stack; end
  end
end

class ActiveStorage::BaseJob < ::ActiveJob::Base; end

class ActiveStorage::Blob < ::ActiveStorage::Record
  include ::ActiveStorage::Blob::GeneratedAttributeMethods
  include ::ActiveStorage::Blob::GeneratedAssociationMethods

  class << self
    # source://activemodel/7.0.5/lib/active_model/validations.rb#52
    def _validators; end

    # source://activerecord/7.0.5/lib/active_record/enum.rb#116
    def defined_enums; end
  end
end

module ActiveStorage::Blob::Analyzable
  def analyze; end
  def analyze_later; end
  def analyzed?; end

  private

  def analyzer; end
  def analyzer_class; end
  def extract_metadata_via_analyzer; end
end

module ActiveStorage::Blob::GeneratedAssociationMethods; end
module ActiveStorage::Blob::GeneratedAttributeMethods; end

module ActiveStorage::Blob::Identifiable
  def identified?; end
  def identify; end
  def identify_without_saving; end

  private

  def download_identifiable_chunk; end
  def identify_content_type; end
end

module ActiveStorage::Blob::Representable
  extend ::ActiveSupport::Concern

  def preview(transformations); end
  def previewable?; end
  def representable?; end
  def representation(transformations); end
  def variable?; end
  def variant(transformations); end

  private

  def default_variant_format; end
  def default_variant_transformations; end
  def format; end
  def variant_class; end
end

class ActiveStorage::Current < ::ActiveSupport::CurrentAttributes
  def host; end
  def host=(host); end

  class << self
    # source://activesupport/7.0.5/lib/active_support/current_attributes.rb#118
    def url_options; end

    # source://activesupport/7.0.5/lib/active_support/current_attributes.rb#118
    def url_options=(value); end
  end
end

class ActiveStorage::DirectUploadsController < ::ActiveStorage::BaseController
  def create; end

  private

  # source://actionview/7.0.5/lib/action_view/layouts.rb#328
  def _layout(lookup_context, formats); end

  def blob_args; end
  def direct_upload_json(blob); end

  class << self
    # source://activesupport/7.0.5/lib/active_support/callbacks.rb#68
    def __callbacks; end

    # source://actionpack/7.0.5/lib/action_controller/metal.rb#210
    def middleware_stack; end
  end
end

class ActiveStorage::DiskController < ::ActiveStorage::BaseController
  include ::ActiveStorage::FileServer

  def show; end
  def update; end

  private

  # source://actionview/7.0.5/lib/action_view/layouts.rb#328
  def _layout(lookup_context, formats); end

  def acceptable_content?(token); end
  def decode_verified_key; end
  def decode_verified_token; end
  def named_disk_service(name); end

  class << self
    # source://activesupport/7.0.5/lib/active_support/callbacks.rb#68
    def __callbacks; end

    # source://actionpack/7.0.5/lib/action_controller/metal.rb#210
    def middleware_stack; end
  end
end

# source://activestorage//lib/active_storage/downloader.rb#4
class ActiveStorage::Downloader
  # @return [Downloader] a new instance of Downloader
  #
  # source://activestorage//lib/active_storage/downloader.rb#7
  def initialize(service); end

  # source://activestorage//lib/active_storage/downloader.rb#11
  def open(key, checksum: T.unsafe(nil), verify: T.unsafe(nil), name: T.unsafe(nil), tmpdir: T.unsafe(nil)); end

  # Returns the value of attribute service.
  #
  # source://activestorage//lib/active_storage/downloader.rb#5
  def service; end

  private

  # source://activestorage//lib/active_storage/downloader.rb#30
  def download(key, file); end

  # source://activestorage//lib/active_storage/downloader.rb#20
  def open_tempfile(name, tmpdir = T.unsafe(nil)); end

  # source://activestorage//lib/active_storage/downloader.rb#37
  def verify_integrity_of(file, checksum:); end
end

# source://activestorage//lib/active_storage/engine.rb#25
class ActiveStorage::Engine < ::Rails::Engine; end

# Generic base class for all Active Storage exceptions.
#
# source://activestorage//lib/active_storage/errors.rb#5
class ActiveStorage::Error < ::StandardError; end

# Raised when ActiveStorage::Blob#download is called on a blob where the
# backing file is no longer present in its service.
#
# source://activestorage//lib/active_storage/errors.rb#25
class ActiveStorage::FileNotFoundError < ::ActiveStorage::Error; end

module ActiveStorage::FileServer
  private

  def serve_file(path, content_type:, disposition:); end
end

class ActiveStorage::Filename
  include ::Comparable

  def initialize(filename); end

  def <=>(other); end
  def as_json(*_arg0); end
  def base; end
  def extension; end
  def extension_with_delimiter; end
  def extension_without_delimiter; end
  def sanitized; end
  def to_json; end
  def to_s; end

  class << self
    def wrap(filename); end
  end
end

# Fixtures are a way of organizing data that you want to test against; in
# short, sample data.
#
# To learn more about fixtures, read the ActiveRecord::FixtureSet documentation.
#
# === YAML
#
# Like other Active Record-backed models, ActiveStorage::Attachment and
# ActiveStorage::Blob records inherit from ActiveRecord::Base instances and
# therefore can be populated by fixtures.
#
# Consider a hypothetical <tt>Article</tt> model class, its related
# fixture data, as well as fixture data for related ActiveStorage::Attachment
# and ActiveStorage::Blob records:
#
#   # app/models/article.rb
#   class Article < ApplicationRecord
#     has_one_attached :thumbnail
#   end
#
#   # fixtures/active_storage/blobs.yml
#   first_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob filename: "first.png" %>
#
#   # fixtures/active_storage/attachments.yml
#   first_thumbnail_attachment:
#     name: thumbnail
#     record: first (Article)
#     blob: first_thumbnail_blob
#
# When processed, Active Record will insert database records for each fixture
# entry and will ensure the Active Storage relationship is intact.
#
# source://activestorage//lib/active_storage/fixture_set.rb#38
class ActiveStorage::FixtureSet
  include ::ActiveSupport::Testing::FileFixtures
  include ::ActiveRecord::SecureToken
  extend ::ActiveRecord::SecureToken::ClassMethods

  # source://activesupport/7.0.5/lib/active_support/testing/file_fixtures.rb#20
  def file_fixture_path; end

  # source://activesupport/7.0.5/lib/active_support/testing/file_fixtures.rb#20
  def file_fixture_path?; end

  # source://activestorage//lib/active_storage/fixture_set.rb#64
  def prepare(instance, **attributes); end

  class << self
    # Generate a YAML-encoded representation of an ActiveStorage::Blob
    # instance's attributes, resolve the file relative to the directory mentioned
    # by ActiveSupport::Testing::FileFixtures.file_fixture, and upload
    # the file to the Service
    #
    # === Examples
    #
    #   # tests/fixtures/action_text/blobs.yml
    #   second_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob(
    #     filename: "second.svg",
    #   ) %>
    #
    #   third_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob(
    #     filename: "third.svg",
    #     content_type: "image/svg+xml",
    #     service_name: "public"
    #   ) %>
    #
    # source://activestorage//lib/active_storage/fixture_set.rb#60
    def blob(filename:, **attributes); end

    # source://activesupport/7.0.5/lib/active_support/testing/file_fixtures.rb#20
    def file_fixture_path; end

    # source://activesupport/7.0.5/lib/active_support/testing/file_fixtures.rb#20
    def file_fixture_path=(value); end

    # source://activesupport/7.0.5/lib/active_support/testing/file_fixtures.rb#20
    def file_fixture_path?; end
  end
end

# Raised when uploaded or downloaded data does not match a precomputed checksum.
# Indicates that a network error or a software bug caused data corruption.
#
# source://activestorage//lib/active_storage/errors.rb#21
class ActiveStorage::IntegrityError < ::ActiveStorage::Error; end

# Raised when ActiveStorage::Blob#variant is called on a blob that isn't variable.
# Use ActiveStorage::Blob#variable? to determine whether a blob is variable.
#
# source://activestorage//lib/active_storage/errors.rb#9
class ActiveStorage::InvariableError < ::ActiveStorage::Error; end

# source://activestorage//lib/active_storage/log_subscriber.rb#6
class ActiveStorage::LogSubscriber < ::ActiveSupport::LogSubscriber
  # source://activestorage//lib/active_storage/log_subscriber.rb#41
  def logger; end

  # source://activestorage//lib/active_storage/log_subscriber.rb#19
  def service_delete(event); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#23
  def service_delete_prefixed(event); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#13
  def service_download(event); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#27
  def service_exist(event); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#35
  def service_mirror(event); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#13
  def service_streaming_download(event); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#7
  def service_upload(event); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#31
  def service_url(event); end

  private

  # source://activestorage//lib/active_storage/log_subscriber.rb#50
  def debug(event, colored_message); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#46
  def info(event, colored_message); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#58
  def key_in(event); end

  # source://activestorage//lib/active_storage/log_subscriber.rb#54
  def log_prefix_for_service(event); end
end

class ActiveStorage::MirrorJob < ::ActiveStorage::BaseJob
  def perform(key, checksum:); end

  class << self
    # source://activejob/7.0.5/lib/active_job/queue_name.rb#56
    def queue_name; end

    # source://activesupport/7.0.5/lib/active_support/rescuable.rb#13
    def rescue_handlers; end
  end
end

class ActiveStorage::Preview
  def initialize(blob, variation_or_variation_key); end

  def blob; end
  def download(&block); end
  def image; end
  def key; end
  def processed; end
  def url(**options); end
  def variation; end

  private

  def previewer; end
  def previewer_class; end
  def process; end
  def processed?; end
  def variant; end
end

class ActiveStorage::Preview::UnprocessedError < ::StandardError; end

# Raised when a Previewer is unable to generate a preview image.
#
# source://activestorage//lib/active_storage/errors.rb#28
class ActiveStorage::PreviewError < ::ActiveStorage::Error; end

# This is an abstract base class for previewers, which generate images from blobs. See
# ActiveStorage::Previewer::MuPDFPreviewer and ActiveStorage::Previewer::VideoPreviewer for
# examples of concrete subclasses.
#
# source://activestorage//lib/active_storage/previewer.rb#7
class ActiveStorage::Previewer
  # @return [Previewer] a new instance of Previewer
  #
  # source://activestorage//lib/active_storage/previewer.rb#16
  def initialize(blob); end

  # Returns the value of attribute blob.
  #
  # source://activestorage//lib/active_storage/previewer.rb#8
  def blob; end

  # Override this method in a concrete subclass. Have it yield an attachable preview image (i.e.
  # anything accepted by ActiveStorage::Attached::One#attach). Pass the additional options to
  # the underlying blob that is created.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/previewer.rb#23
  def preview(**options); end

  private

  # source://activestorage//lib/active_storage/previewer.rb#71
  def capture(*argv, to:); end

  # Downloads the blob to a tempfile on disk. Yields the tempfile.
  #
  # source://activestorage//lib/active_storage/previewer.rb#29
  def download_blob_to_tempfile(&block); end

  # Executes a system command, capturing its binary output in a tempfile. Yields the tempfile.
  #
  # Use this method to shell out to a system library (e.g. muPDF or FFmpeg) for preview image
  # generation. The resulting tempfile can be used as the +:io+ value in an attachable Hash:
  #
  #   def preview
  #     download_blob_to_tempfile do |input|
  #       draw "my-drawing-command", input.path, "--format", "png", "-" do |output|
  #         yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png"
  #       end
  #     end
  #   end
  #
  # The output tempfile is opened in the directory returned by #tmpdir.
  #
  # source://activestorage//lib/active_storage/previewer.rb#47
  def draw(*argv); end

  # source://activestorage//lib/active_storage/previewer.rb#67
  def instrument(operation, payload = T.unsafe(nil), &block); end

  # source://activestorage//lib/active_storage/previewer.rb#86
  def logger; end

  # source://activestorage//lib/active_storage/previewer.rb#57
  def open_tempfile; end

  # source://activestorage//lib/active_storage/previewer.rb#90
  def tmpdir; end

  class << self
    # Implement this method in a concrete subclass. Have it return true when given a blob from which
    # the previewer can generate an image.
    #
    # @return [Boolean]
    #
    # source://activestorage//lib/active_storage/previewer.rb#12
    def accept?(blob); end
  end
end

# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#4
class ActiveStorage::Previewer::MuPDFPreviewer < ::ActiveStorage::Previewer
  # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#23
  def preview(**options); end

  private

  # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#32
  def draw_first_page_from(file, &block); end

  class << self
    # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#6
    def accept?(blob); end

    # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#14
    def mutool_exists?; end

    # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#10
    def mutool_path; end
  end
end

# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#4
class ActiveStorage::Previewer::PopplerPDFPreviewer < ::ActiveStorage::Previewer
  # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#21
  def preview(**options); end

  private

  # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#30
  def draw_first_page_from(file, &block); end

  class << self
    # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#6
    def accept?(blob); end

    # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#14
    def pdftoppm_exists?; end

    # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#10
    def pdftoppm_path; end
  end
end

# source://activestorage//lib/active_storage/previewer/video_previewer.rb#6
class ActiveStorage::Previewer::VideoPreviewer < ::ActiveStorage::Previewer
  # source://activestorage//lib/active_storage/previewer/video_previewer.rb#23
  def preview(**options); end

  private

  # source://activestorage//lib/active_storage/previewer/video_previewer.rb#32
  def draw_relevant_frame_from(file, &block); end

  class << self
    # source://activestorage//lib/active_storage/previewer/video_previewer.rb#8
    def accept?(blob); end

    # source://activestorage//lib/active_storage/previewer/video_previewer.rb#12
    def ffmpeg_exists?; end

    # source://activestorage//lib/active_storage/previewer/video_previewer.rb#18
    def ffmpeg_path; end
  end
end

class ActiveStorage::PurgeJob < ::ActiveStorage::BaseJob
  def perform(blob); end

  class << self
    # source://activejob/7.0.5/lib/active_job/queue_name.rb#56
    def queue_name; end

    # source://activesupport/7.0.5/lib/active_support/rescuable.rb#13
    def rescue_handlers; end
  end
end

class ActiveStorage::Record < ::ActiveRecord::Base
  include ::ActiveStorage::Record::GeneratedAttributeMethods
  include ::ActiveStorage::Record::GeneratedAssociationMethods

  class << self
    # source://activemodel/7.0.5/lib/active_model/validations.rb#52
    def _validators; end

    # source://activerecord/7.0.5/lib/active_record/enum.rb#116
    def defined_enums; end
  end
end

module ActiveStorage::Record::GeneratedAssociationMethods; end
module ActiveStorage::Record::GeneratedAttributeMethods; end

# source://activestorage//lib/active_storage/reflection.rb#4
module ActiveStorage::Reflection; end

# source://activestorage//lib/active_storage/reflection.rb#49
module ActiveStorage::Reflection::ActiveRecordExtensions
  extend ::ActiveSupport::Concern
  include GeneratedInstanceMethods

  mixes_in_class_methods GeneratedClassMethods
  mixes_in_class_methods ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods

  module GeneratedClassMethods
    def attachment_reflections; end
    def attachment_reflections=(value); end
    def attachment_reflections?; end
  end

  module GeneratedInstanceMethods
    def attachment_reflections; end
    def attachment_reflections?; end
  end
end

# source://activestorage//lib/active_storage/reflection.rb#56
module ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods
  # Returns an array of reflection objects for all the attachments in the
  # class.
  #
  # source://activestorage//lib/active_storage/reflection.rb#59
  def reflect_on_all_attachments; end

  # Returns the reflection object for the named +attachment+.
  #
  #    User.reflect_on_attachment(:avatar)
  #    # => the avatar reflection
  #
  # source://activestorage//lib/active_storage/reflection.rb#68
  def reflect_on_attachment(attachment); end
end

# source://activestorage//lib/active_storage/reflection.rb#5
class ActiveStorage::Reflection::HasAttachedReflection < ::ActiveRecord::Reflection::MacroReflection
  # source://activestorage//lib/active_storage/reflection.rb#6
  def variant(name, transformations); end

  # source://activestorage//lib/active_storage/reflection.rb#10
  def variants; end
end

# Holds all the metadata about a has_many_attached attachment as it was
# specified in the Active Record class.
#
# source://activestorage//lib/active_storage/reflection.rb#25
class ActiveStorage::Reflection::HasManyAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection
  # source://activestorage//lib/active_storage/reflection.rb#26
  def macro; end
end

# Holds all the metadata about a has_one_attached attachment as it was
# specified in the Active Record class.
#
# source://activestorage//lib/active_storage/reflection.rb#17
class ActiveStorage::Reflection::HasOneAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection
  # source://activestorage//lib/active_storage/reflection.rb#18
  def macro; end
end

# source://activestorage//lib/active_storage/reflection.rb#31
module ActiveStorage::Reflection::ReflectionExtension
  # source://activestorage//lib/active_storage/reflection.rb#32
  def add_attachment_reflection(model, name, reflection); end

  private

  # source://activestorage//lib/active_storage/reflection.rb#37
  def reflection_class_for(macro); end
end

# Abstract class serving as an interface for concrete services.
#
# The available services are:
#
# * +Disk+, to manage attachments saved directly on the hard drive.
# * +GCS+, to manage attachments through Google Cloud Storage.
# * +S3+, to manage attachments through Amazon S3.
# * +AzureStorage+, to manage attachments through Microsoft Azure Storage.
# * +Mirror+, to be able to use several services to manage attachments.
#
# Inside a Rails application, you can set-up your services through the
# generated <tt>config/storage.yml</tt> file and reference one
# of the aforementioned constant under the +service+ key. For example:
#
#   local:
#     service: Disk
#     root: <%= Rails.root.join("storage") %>
#
# You can checkout the service's constructor to know which keys are required.
#
# Then, in your application's configuration, you can specify the service to
# use like this:
#
#   config.active_storage.service = :local
#
# If you are using Active Storage outside of a Ruby on Rails application, you
# can configure the service to use like this:
#
#   ActiveStorage::Blob.service = ActiveStorage::Service.configure(
#     :local,
#     { local: {service: "Disk",  root: Pathname("/tmp/foo/storage") } }
#   )
#
# source://activestorage//lib/active_storage/service.rb#41
class ActiveStorage::Service
  extend ::ActiveSupport::Autoload

  # Concatenate multiple files into a single "composed" file.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#94
  def compose(source_keys, destination_key, filename: T.unsafe(nil), content_type: T.unsafe(nil), disposition: T.unsafe(nil), custom_metadata: T.unsafe(nil)); end

  # Delete the file at the +key+.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#99
  def delete(key); end

  # Delete files at keys starting with the +prefix+.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#104
  def delete_prefixed(prefix); end

  # Return the content of the file at the +key+.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#80
  def download(key); end

  # Return the partial content in the byte +range+ of the file at the +key+.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#85
  def download_chunk(key, range); end

  # Return +true+ if a file exists at the +key+.
  #
  # @raise [NotImplementedError]
  # @return [Boolean]
  #
  # source://activestorage//lib/active_storage/service.rb#109
  def exist?(key); end

  # Returns a Hash of headers for +url_for_direct_upload+ requests.
  #
  # source://activestorage//lib/active_storage/service.rb#141
  def headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end

  # Returns the value of attribute name.
  #
  # source://activestorage//lib/active_storage/service.rb#44
  def name; end

  # Sets the attribute name
  #
  # @param value the value to set the attribute name to.
  #
  # source://activestorage//lib/active_storage/service.rb#44
  def name=(_arg0); end

  # source://activestorage//lib/active_storage/service.rb#89
  def open(*args, **options, &block); end

  # @return [Boolean]
  #
  # source://activestorage//lib/active_storage/service.rb#145
  def public?; end

  # Update metadata for the file identified by +key+ in the service.
  # Override in subclasses only if the service needs to store specific
  # metadata that has to be updated upon identification.
  #
  # source://activestorage//lib/active_storage/service.rb#76
  def update_metadata(key, **metadata); end

  # Upload the +io+ to the +key+ specified. If a +checksum+ is provided, the service will
  # ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#69
  def upload(key, io, checksum: T.unsafe(nil), **options); end

  # Returns the URL for the file at the +key+. This returns a permanent URL for public files, and returns a
  # short-lived URL for private files. For private files you can provide the +disposition+ (+:inline+ or +:attachment+),
  # +filename+, and +content_type+ that you wish the file to be served with on request. Additionally, you can also provide
  # the amount of seconds the URL will be valid for, specified in +expires_in+.
  #
  # source://activestorage//lib/active_storage/service.rb#117
  def url(key, **options); end

  # Returns a signed, temporary URL that a direct upload file can be PUT to on the +key+.
  # The URL will be valid for the amount of seconds specified in +expires_in+.
  # You must also provide the +content_type+, +content_length+, and +checksum+ of the file
  # that will be uploaded. All these attributes will be validated by the service upon upload.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#136
  def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end

  private

  # source://activestorage//lib/active_storage/service.rb#173
  def content_disposition_with(filename:, type: T.unsafe(nil)); end

  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#158
  def custom_metadata_headers(metadata); end

  # source://activestorage//lib/active_storage/service.rb#162
  def instrument(operation, payload = T.unsafe(nil), &block); end

  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#150
  def private_url(key, expires_in:, filename:, disposition:, content_type:, **_arg5); end

  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/service.rb#154
  def public_url(key, **_arg1); end

  # source://activestorage//lib/active_storage/service.rb#168
  def service_name; end

  class << self
    # Override in subclasses that stitch together multiple services and hence
    # need to build additional services using the configurator.
    #
    # Passes the configurator and all of the service's config as keyword args.
    #
    # See MirrorService for an example.
    #
    # source://activestorage//lib/active_storage/service.rb#60
    def build(configurator:, name:, service: T.unsafe(nil), **service_config); end

    # Configure an Active Storage service by name from a set of configurations,
    # typically loaded from a YAML file. The Active Storage engine uses this
    # to set the global Active Storage service when the app boots.
    #
    # source://activestorage//lib/active_storage/service.rb#50
    def configure(service_name, configurations); end
  end
end

# source://activestorage//lib/active_storage/service/configurator.rb#4
class ActiveStorage::Service::Configurator
  # source://activestorage//lib/active_storage/service/configurator.rb#11
  def initialize(configurations); end

  # source://activestorage//lib/active_storage/service/configurator.rb#15
  def build(service_name); end

  # source://activestorage//lib/active_storage/service/configurator.rb#5
  def configurations; end

  private

  # source://activestorage//lib/active_storage/service/configurator.rb#23
  def config_for(name); end

  # source://activestorage//lib/active_storage/service/configurator.rb#29
  def resolve(class_name); end

  class << self
    # source://activestorage//lib/active_storage/service/configurator.rb#7
    def build(service_name, configurations); end
  end
end

# source://activestorage//lib/active_storage/service/registry.rb#4
class ActiveStorage::Service::Registry
  # source://activestorage//lib/active_storage/service/registry.rb#5
  def initialize(configurations); end

  # source://activestorage//lib/active_storage/service/registry.rb#10
  def fetch(name); end

  private

  # source://activestorage//lib/active_storage/service/registry.rb#26
  def configurations; end

  # source://activestorage//lib/active_storage/service/registry.rb#28
  def configurator; end

  # source://activestorage//lib/active_storage/service/registry.rb#26
  def services; end
end

module ActiveStorage::SetBlob
  extend ::ActiveSupport::Concern

  private

  def blob_scope; end
  def set_blob; end
end

module ActiveStorage::SetCurrent
  extend ::ActiveSupport::Concern
end

module ActiveStorage::Streaming
  extend ::ActiveSupport::Concern
  include ::ActionController::Rendering
  include ::ActionController::DataStreaming
  include ::ActionController::Live

  mixes_in_class_methods ::ActionController::Rendering::ClassMethods
  mixes_in_class_methods ::ActionController::Live::ClassMethods

  private

  def send_blob_byte_range_data(blob, range_header, disposition: T.unsafe(nil)); end
  def send_blob_stream(blob, disposition: T.unsafe(nil)); end
end

ActiveStorage::Streaming::DEFAULT_BLOB_STREAMING_DISPOSITION = T.let(T.unsafe(nil), String)

# source://activestorage//lib/active_storage.rb#367
module ActiveStorage::Transformers
  extend ::ActiveSupport::Autoload
end

# source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#14
class ActiveStorage::Transformers::ImageProcessingTransformer < ::ActiveStorage::Transformers::Transformer
  private

  # source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#32
  def operations; end

  # source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#19
  def process(file, format:); end

  # source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#28
  def processor; end

  # source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#79
  def validate_arg_array(argument); end

  # source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#93
  def validate_arg_hash(argument); end

  # @raise [UnsupportedImageProcessingArgument]
  #
  # source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#71
  def validate_arg_string(argument); end

  # source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#51
  def validate_transformation(name, argument); end
end

# source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#17
class ActiveStorage::Transformers::ImageProcessingTransformer::UnsupportedImageProcessingArgument < ::StandardError; end

# source://activestorage//lib/active_storage/transformers/image_processing_transformer.rb#16
class ActiveStorage::Transformers::ImageProcessingTransformer::UnsupportedImageProcessingMethod < ::StandardError; end

# A Transformer applies a set of transformations to an image.
#
# The following concrete subclasses are included in Active Storage:
#
# * ActiveStorage::Transformers::ImageProcessingTransformer:
#   backed by ImageProcessing, a common interface for MiniMagick and ruby-vips
#
# source://activestorage//lib/active_storage/transformers/transformer.rb#11
class ActiveStorage::Transformers::Transformer
  # @return [Transformer] a new instance of Transformer
  #
  # source://activestorage//lib/active_storage/transformers/transformer.rb#14
  def initialize(transformations); end

  # Applies the transformations to the source image in +file+, producing a target image in the
  # specified +format+. Yields an open Tempfile containing the target image. Closes and unlinks
  # the output tempfile after yielding to the given block. Returns the result of the block.
  #
  # source://activestorage//lib/active_storage/transformers/transformer.rb#21
  def transform(file, format:); end

  # Returns the value of attribute transformations.
  #
  # source://activestorage//lib/active_storage/transformers/transformer.rb#12
  def transformations; end

  private

  # Returns an open Tempfile containing a transformed image in the given +format+.
  # All subclasses implement this method.
  #
  # @raise [NotImplementedError]
  #
  # source://activestorage//lib/active_storage/transformers/transformer.rb#34
  def process(file, format:); end
end

# Raised when ActiveStorage::Blob#preview is called on a blob that isn't previewable.
# Use ActiveStorage::Blob#previewable? to determine whether a blob is previewable.
#
# source://activestorage//lib/active_storage/errors.rb#13
class ActiveStorage::UnpreviewableError < ::ActiveStorage::Error; end

# Raised when ActiveStorage::Blob#representation is called on a blob that isn't representable.
# Use ActiveStorage::Blob#representable? to determine whether a blob is representable.
#
# source://activestorage//lib/active_storage/errors.rb#17
class ActiveStorage::UnrepresentableError < ::ActiveStorage::Error; end

# source://activestorage//lib/active_storage/gem_version.rb#9
module ActiveStorage::VERSION; end

# source://activestorage//lib/active_storage/gem_version.rb#10
ActiveStorage::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)

# source://activestorage//lib/active_storage/gem_version.rb#11
ActiveStorage::VERSION::MINOR = T.let(T.unsafe(nil), Integer)

# source://activestorage//lib/active_storage/gem_version.rb#13
ActiveStorage::VERSION::PRE = T.let(T.unsafe(nil), T.untyped)

# source://activestorage//lib/active_storage/gem_version.rb#15
ActiveStorage::VERSION::STRING = T.let(T.unsafe(nil), String)

# source://activestorage//lib/active_storage/gem_version.rb#12
ActiveStorage::VERSION::TINY = T.let(T.unsafe(nil), Integer)

class ActiveStorage::Variant
  def initialize(blob, variation_or_variation_key); end

  def blob; end
  def content_type(*_arg0, **_arg1, &_arg2); end
  def content_type_for_serving(*_arg0, **_arg1, &_arg2); end
  def download(&block); end
  def filename; end
  def forced_disposition_for_serving; end
  def image; end
  def key; end
  def processed; end
  def service(*_arg0, **_arg1, &_arg2); end
  def url(expires_in: T.unsafe(nil), disposition: T.unsafe(nil)); end
  def variation; end

  private

  def process; end
  def processed?; end
end

class ActiveStorage::VariantRecord < ::ActiveStorage::Record
  include ::ActiveStorage::VariantRecord::GeneratedAttributeMethods
  include ::ActiveStorage::VariantRecord::GeneratedAssociationMethods

  # source://activerecord/7.0.5/lib/active_record/autosave_association.rb#160
  def autosave_associated_records_for_blob(*args); end

  class << self
    # source://activesupport/7.0.5/lib/active_support/callbacks.rb#68
    def __callbacks; end

    # source://activerecord/7.0.5/lib/active_record/reflection.rb#11
    def _reflections; end

    # source://activemodel/7.0.5/lib/active_model/validations.rb#52
    def _validators; end

    # source://activerecord/7.0.5/lib/active_record/enum.rb#116
    def defined_enums; end
  end
end

module ActiveStorage::VariantRecord::GeneratedAssociationMethods
  # source://activerecord/7.0.5/lib/active_record/associations/builder/association.rb#103
  def blob; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/association.rb#111
  def blob=(value); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/belongs_to.rb#132
  def blob_changed?; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/belongs_to.rb#136
  def blob_previously_changed?; end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#28
  def build_blob(*args, &block); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#32
  def create_blob(*args, &block); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#36
  def create_blob!(*args, &block); end

  # source://activerecord/7.0.5/lib/active_record/associations/builder/singular_association.rb#19
  def reload_blob; end
end

module ActiveStorage::VariantRecord::GeneratedAttributeMethods; end

class ActiveStorage::VariantWithRecord
  def initialize(blob, variation); end

  def blob; end
  def download(*_arg0, **_arg1, &_arg2); end
  def image; end
  def key(*_arg0, **_arg1, &_arg2); end
  def process; end
  def processed; end
  def processed?; end
  def service(*_arg0, **_arg1, &_arg2); end
  def url(*_arg0, **_arg1, &_arg2); end
  def variation; end

  private

  def create_or_find_record(image:); end
  def record; end
  def transform_blob; end
end

class ActiveStorage::Variation
  def initialize(transformations); end

  def content_type; end
  def default_to(defaults); end
  def digest; end
  def format; end
  def key; end
  def transform(file, &block); end
  def transformations; end

  private

  def transformer; end

  class << self
    def decode(key); end
    def encode(transformations); end
    def wrap(variator); end
  end
end