Installation as Rails plugin
From the Rails project root, execute:
script/plugin install git://github.com/Narnach/file_wrapper.git
Installation as gem
Install the gem by executing:
sudo gem install Narnach-file_wrapper --remote --source http://gems.github.com
Example
Detect the mime-type of a file.
FileWrapper.get_mime('Rakefile') #=> 'text/plain'
http://github.com/Narnach/file_wrapper/tree/master
No comments:
Post a Comment