Skip to content

ZaikoXander/file_to_tempfile

Repository files navigation

FileToTempfile

Easily convert a File object to a Tempfile object.

Installation

Add this line to your application's Gemfile:

gem 'file_to_tempfile'

And then execute:

$ bundle install

Usage

require 'file_to_tempfile'

file = File.open '.gitignore'

tempfile = FileToTempfile.convert(file)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ZaikoXander/file_to_tempfile.

License

The gem is available as open source under the terms of the MIT License.