Module: Shrine::Attachment::ClassMethods
- Included in:
- Shrine::Attachment
- Defined in:
- lib/shrine/attachment.rb
Instance Attribute Summary collapse
-
#shrine_class ⇒ Object
Returns the Shrine class that this attachment class is namespaced under.
Instance Method Summary collapse
-
#inspect ⇒ Object
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.
Instance Attribute Details
#shrine_class ⇒ Object
Returns the Shrine class that this attachment class is namespaced under.
13 14 15 |
# File 'lib/shrine/attachment.rb', line 13 def shrine_class @shrine_class end |
Instance Method Details
#inspect ⇒ Object
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.
18 19 20 |
# File 'lib/shrine/attachment.rb', line 18 def inspect "#{shrine_class.inspect}::Attachment" end |