Class: Emailfuse::Deliverer::Attachment

Inherits:
StringIO
  • Object
show all
Defined in:
lib/emailfuse/deliverer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attachment, *rest) ⇒ Attachment

Returns a new instance of Attachment.



6
7
8
9
10
11
# File 'lib/emailfuse/deliverer.rb', line 6

def initialize (attachment, *rest)
  @path = ""
  @original_filename = attachment.filename
  @content_type = attachment.content_type.split(";")[0]
  super attachment.body.decoded
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



4
5
6
# File 'lib/emailfuse/deliverer.rb', line 4

def content_type
  @content_type
end

#original_filenameObject (readonly)

Returns the value of attribute original_filename.



4
5
6
# File 'lib/emailfuse/deliverer.rb', line 4

def original_filename
  @original_filename
end

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/emailfuse/deliverer.rb', line 4

def path
  @path
end