Module: Shrine::UploadedFile::ClassMethods

Included in:
Shrine::UploadedFile
Defined in:
lib/shrine/uploaded_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#shrine_classObject

Returns the Shrine class that this file class is namespaced under.


14
15
16
# File 'lib/shrine/uploaded_file.rb', line 14

def shrine_class
  @shrine_class
end

Instance Method Details

#inspectObject

Since UploadedFile is anonymously subclassed when Shrine is subclassed, and then assigned to a constant of the Shrine subclass, make inspect reflect the likely name for the class.


19
20
21
# File 'lib/shrine/uploaded_file.rb', line 19

def inspect
  "#{shrine_class.inspect}::UploadedFile"
end