README.md in send_file-1.0.0 vs README.md in send_file-1.0.1

- old
+ new

@@ -8,11 +8,11 @@ Make sure your application implements two methods: `env` and `halt`, where `env` returns a hash with the Rack environment and `halt` returns an array response like `[status, headers, [body]]`. -The next example uses [Cuba][cuba]: +### Using [Cuba][cuba] ```ruby require "cuba" require "send_file" @@ -23,29 +23,45 @@ send_file("foo.pdf") end end ``` +### Using [Hobbit][hobbit] + +```ruby +require "hobbit" +require "send_file" + +class App < Hobbit::Base + include Sendfile + + get "/foo" do + send_file("foo.pdf") + end +end +``` + Attachments ----------- -For **attachments**, it's recommended to use the HTML5 [download][download] attribute. +For attachments, it's recommended to use the HTML5 [download][download] attribute. ```html -<a href="/foo" download>Download foo</a> +<a href="/foo" download>Download foo.pdf</a> ``` You can specify a filename too: ```html -<a href="/foo" download="bar.pdf">Download bar</a> +<a href="/foo" download="bar.pdf">Download bar.pdf</a> ``` Installation ------------ ``` $ gem install send_file ``` [cuba]: https://github.com/soveran/cuba +[hobbit]: https://github.com/patriciomacadden/hobbit [download]: http://davidwalsh.name/download-attribute