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.



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

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.



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

def content_type
  @content_type
end

#original_filenameObject (readonly)

Returns the value of attribute original_filename.



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

def original_filename
  @original_filename
end

#pathObject (readonly)

Returns the value of attribute path.



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

def path
  @path
end