http_accept
Simple library for HTTP Accept header parsing and ordering.
HTTPAccept::Parser.new("text/*, text/html, text/html;level=1, */*").run.map(&:to_s)
=> ["text/html; level=1", "text/html", "text/*", "*/*"]
Testing
rake test
Project
Simple library for HTTP Accept header parsing and ordering.
HTTPAccept::Parser.new("text/*, text/html, text/html;level=1, */*").run.map(&:to_s)
=> ["text/html; level=1", "text/html", "text/*", "*/*"]
rake test