class Shrine::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
159 def initialize(content, content_type: nil, filename: nil)
160   @content_type      = content_type
161   @original_filename = filename
162   @io                = StringIO.new(content)
163 end

Public Instance methods

close()
[show source]
    # File lib/shrine/plugins/data_uri.rb
172 def close
173   @io.close
174   @io.string.clear # deallocate string
175 end
to_io()
[show source]
    # File lib/shrine/plugins/data_uri.rb
165 def to_io
166   @io
167 end