Class: ActiveStorageValidations::ASVAttachableAdapter::Uploaded

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

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ActiveStorageValidations::ASVAttachableAdapter::Base

Instance Method Details

#content_typeObject



129
130
131
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 129

def content_type
  @attachable.content_type
end

#filenameObject



133
134
135
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 133

def filename
  @attachable.original_filename
end

#read(max_byte_size: nil) ⇒ Object



137
138
139
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 137

def read(max_byte_size: nil)
  read_from(@attachable, max_byte_size)
end

#rewindObject



141
142
143
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 141

def rewind
  @attachable.rewind
end

#with_media_path(_tempfile) {|@attachable.path| ... } ⇒ Object

Yields:

  • (@attachable.path)


145
146
147
# File 'lib/active_storage_validations/asv_attachable_adapter.rb', line 145

def with_media_path(_tempfile)
  yield @attachable.path
end