Sha256: cb5be2ba24fca475b609e4c915106f7d1ed4fdad62e68c72b1abfe1f1ec9d7c5

Contents?: true

Size: 449 Bytes

Versions: 6

Compression:

Stored size: 449 Bytes

Contents

# https://github.com/refile/refile/blob/49efe827717bca12f31c5f3a4f6973509a46508e/lib/refile/file_double.rb

module Refile
  class FileDouble
    attr_reader :original_filename, :content_type
    def initialize(data, name = nil, content_type: nil)
      @io = StringIO.new(data)
      @original_filename = name
      @content_type = content_type
    end

    extend Forwardable
    def_delegators :@io, :read, :rewind, :size, :eof?, :close
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kawara-0.3.2 spec/support/refile.rb
kawara-0.3.1 spec/support/refile.rb
kawara-0.3.0 spec/support/refile.rb
kawara-0.2.0 spec/support/refile.rb
kawara-0.1.1 spec/support/refile.rb
kawara-0.1.0 spec/support/refile.rb