Class: MailAttachmentUploader::MimeIO

Inherits:
StringIO
  • Object
show all
Defined in:
lib/generators/mastiff/install/templates/carrierwave/mail_attachment_uploader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ MimeIO

Returns a new instance of MimeIO.



10
11
12
13
# File 'lib/generators/mastiff/install/templates/carrierwave/mail_attachment_uploader.rb', line 10

def initialize(*args)
  super(*args[1..-1])
  @filepath = args[0]
end

Instance Attribute Details

#filepathObject

Returns the value of attribute filepath.



8
9
10
# File 'lib/generators/mastiff/install/templates/carrierwave/mail_attachment_uploader.rb', line 8

def filepath
  @filepath
end

Instance Method Details

#original_filenameObject



15
16
17
# File 'lib/generators/mastiff/install/templates/carrierwave/mail_attachment_uploader.rb', line 15

def original_filename
  File.basename(@filepath)
end