Public Class methods
new(name, **options)
Defines instance methods on initialization.
[show source]
# File lib/shrine/plugins/entity.rb 13 def initialize(name, **options) 14 super 15 16 define_entity_methods(name) 17 end
Public Instance methods
included(klass)
Defines class methods on inclusion.
[show source]
# File lib/shrine/plugins/entity.rb 20 def included(klass) 21 super 22 23 attachment = self 24 25 klass.send(:define_singleton_method, :"#{@name}_attacher") do |**options| 26 attachment.send(:class_attacher, **options) 27 end 28 end