class Shrine::DataFile

Attributes

content_type[R]
original_filename[R]

Public Class Methods

new(content, content_type: nil, filename: nil) click to toggle source
# File lib/shrine/plugins/data_uri.rb, line 159
def initialize(content, content_type: nil, filename: nil)
  @content_type      = content_type
  @original_filename = filename
  @io                = StringIO.new(content)
end

Public Instance Methods

close() click to toggle source
# File lib/shrine/plugins/data_uri.rb, line 172
def close
  @io.close
  @io.string.clear # deallocate string
end
to_io() click to toggle source
# File lib/shrine/plugins/data_uri.rb, line 165
def to_io
  @io
end