Class: Tessera::Otrs::Attachment
- Defined in:
- lib/tessera/otrs/attachment.rb
Instance Attribute Summary collapse
-
#Content ⇒ Object
Returns the value of attribute Content.
-
#ContentType ⇒ Object
Returns the value of attribute ContentType.
-
#Filename ⇒ Object
Returns the value of attribute Filename.
Instance Method Summary collapse
-
#initialize(tempfile:) ⇒ Attachment
constructor
A new instance of Attachment.
Methods inherited from Base
Constructor Details
#initialize(tempfile:) ⇒ Attachment
Returns a new instance of Attachment.
6 7 8 9 10 11 |
# File 'lib/tessera/otrs/attachment.rb', line 6 def initialize(tempfile:) tempfile.rewind @Content = Base64.encode64(tempfile.read) @ContentType = tempfile.content_type @Filename = tempfile.original_filename end |
Instance Attribute Details
#Content ⇒ Object
Returns the value of attribute Content.
4 5 6 |
# File 'lib/tessera/otrs/attachment.rb', line 4 def Content @Content end |
#ContentType ⇒ Object
Returns the value of attribute ContentType.
4 5 6 |
# File 'lib/tessera/otrs/attachment.rb', line 4 def ContentType @ContentType end |
#Filename ⇒ Object
Returns the value of attribute Filename.
4 5 6 |
# File 'lib/tessera/otrs/attachment.rb', line 4 def Filename @Filename end |