Class: Yoti::Image

Inherits:
Media
  • Object
show all
Defined in:
lib/yoti/data_type/image.rb

Direct Known Subclasses

ImageJpeg, ImagePng

Instance Attribute Summary

Attributes inherited from Media

#content, #mime_type

Instance Method Summary collapse

Methods inherited from Media

#base64_content

Constructor Details

#initialize(content, mime_type) ⇒ Image

Returns a new instance of Image.

Raises:

  • (TypeError)


5
6
7
8
9
# File 'lib/yoti/data_type/image.rb', line 5

def initialize(content, mime_type)
  raise(TypeError, "#{self.class} is an abstract class, so cannot be instantiated") if self.class == Image

  super(content, mime_type)
end