class Shrine::Plugins::DataUri::DataFile

  1. lib/shrine/plugins/data_uri.rb
Superclass: Object

Methods

Public Class

  1. new

Public Instance

  1. close
  2. content_type
  3. original_filename
  4. to_io

Attributes

Public Class methods

new (content, content_type: nil, filename: nil)
[show source]
# File lib/shrine/plugins/data_uri.rb, line 181
def initialize(content, content_type: nil, filename: nil)
  @content_type      = content_type
  @original_filename = filename
  @io                = StringIO.new(content)
end

Public Instance methods

close ()
[show source]
# File lib/shrine/plugins/data_uri.rb, line 194
def close
  @io.close
  @io.string.clear # deallocate string
end
to_io ()
[show source]
# File lib/shrine/plugins/data_uri.rb, line 187
def to_io
  @io
end