module Shrine::Attachment::ClassMethods

  1. lib/shrine/attachment.rb

Methods

Public Instance

  1. []
  2. inspect
  3. shrine_class

Attributes

shrine_class [RW]

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

Public Instance methods

[](*args, **options)

Shorthand for Attachment.new.

Shrine::Attachment

[show source]
   # File lib/shrine/attachment.rb
25 def [](*args, **options)
26   new(*args, **options)
27 end
inspect()

Since Attachment 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.

[show source]
   # File lib/shrine/attachment.rb
18 def inspect
19   "#{shrine_class.inspect}::Attachment"
20 end