module Shrine::Plugins::RemoveAttachment::AttachmentMethods

Public Instance Methods

define_model_methods(name) click to toggle source
Calls superclass method
# File lib/shrine/plugins/remove_attachment.rb, line 8
def define_model_methods(name)
  super if defined?(super)

  define_method :"remove_#{name}=" do |value|
    send(:"#{name}_attacher").remove = value
  end

  define_method :"remove_#{name}" do
    send(:"#{name}_attacher").remove
  end
end