Module: Shrine::Plugins::RemoveAttachment::AttacherMethods

Defined in:
lib/shrine/plugins/remove_attachment.rb

Instance Method Summary collapse

Instance Method Details

#removeObject



30
31
32
# File 'lib/shrine/plugins/remove_attachment.rb', line 30

def remove
  @remove
end

#remove=(value) ⇒ Object

We remove the attachment if the value evaluates to true.



25
26
27
28
# File 'lib/shrine/plugins/remove_attachment.rb', line 25

def remove=(value)
  @remove = value
  assign(nil) if remove?
end