Class: Snails::Mailer::MailgunBackend::Attachment

Inherits:
StringIO
  • Object
show all
Defined in:
lib/snails/mailer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, filename, content_type) ⇒ Attachment

Returns a new instance of Attachment.



205
206
207
208
209
210
# File 'lib/snails/mailer.rb', line 205

def initialize(data, filename, content_type)
  super(data)
  @path = '' # path
  @original_filename = filename
  @content_type = content_type || 'application/octet-stream'
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



203
204
205
# File 'lib/snails/mailer.rb', line 203

def content_type
  @content_type
end

#original_filenameObject (readonly)

Returns the value of attribute original_filename.



203
204
205
# File 'lib/snails/mailer.rb', line 203

def original_filename
  @original_filename
end

#pathObject (readonly)

Returns the value of attribute path.



203
204
205
# File 'lib/snails/mailer.rb', line 203

def path
  @path
end