Class: Cloudinary::Blob

Inherits:
StringIO
  • Object
show all
Defined in:
lib/cloudinary/blob.rb

Overview

Copyright Cloudinary

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, options = {}) ⇒ Blob

Returns a new instance of Blob.



6
7
8
9
10
# File 'lib/cloudinary/blob.rb', line 6

def initialize(data, options={})
  super(data)
  @original_filename = options[:original_filename] || "cloudinaryfile"
  @content_type = options[:content_type] || "application/octet-stream"
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



3
4
5
# File 'lib/cloudinary/blob.rb', line 3

def content_type
  @content_type
end

#original_filenameObject (readonly) Also known as: path

Returns the value of attribute original_filename.



3
4
5
# File 'lib/cloudinary/blob.rb', line 3

def original_filename
  @original_filename
end