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

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

Instance Method Summary collapse

Instance Method Details

#removeObject



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

def remove
  @remove
end

#remove=(value) ⇒ Object

We remove the attachment if the value evaluates to true.



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

def remove=(value)
  @remove = value

  change(nil) if remove?
end