Class: SmsBackupRenderer::MediaPart

Inherits:
MessagePart show all
Defined in:
lib/sms_backup_renderer/models.rb

Direct Known Subclasses

ImagePart, VideoPart

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content_type, path) ⇒ MediaPart

Returns a new instance of MediaPart.



104
105
106
107
# File 'lib/sms_backup_renderer/models.rb', line 104

def initialize(content_type, path)
  @content_type = content_type
  @path = path
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the String content type for the message part such as ‘image/jpeg’.



99
100
101
# File 'lib/sms_backup_renderer/models.rb', line 99

def content_type
  @content_type
end

#pathObject (readonly)

Returns the String file path at which the content has been stored.



102
103
104
# File 'lib/sms_backup_renderer/models.rb', line 102

def path
  @path
end