Class: ActiveStorageValidations::ASVAttachableAdapter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/active_storage_validations/asv_attachable_adapter.rb

Direct Known Subclasses

Blob, FileLike, HashIo, Unsupported, Uploaded

Instance Method Summary collapse

Constructor Details

#initialize(attachable, file_supported:) ⇒ Base

Returns a new instance of Base.



50
51
52
53
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 50

def initialize(attachable, file_supported:)
  @attachable = attachable
  @file_supported = file_supported
end

Instance Method Details

#content_typeObject

Raises:

  • (NotImplementedError)


55
56
57
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 55

def content_type
  raise NotImplementedError
end

#filenameObject

Raises:

  • (NotImplementedError)


59
60
61
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 59

def filename
  raise NotImplementedError
end

#read(max_byte_size: nil) ⇒ Object

Raises:

  • (NotImplementedError)


63
64
65
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 63

def read(max_byte_size: nil)
  raise NotImplementedError
end

#rewindObject



67
68
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 67

def rewind
end

#with_media_path(_tempfile) ⇒ Object

Raises:

  • (NotImplementedError)


70
71
72
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 70

def with_media_path(_tempfile)
  raise NotImplementedError
end