Virtus URI
Provides a URI attribute for Virtus.
Getting Started
- Add to your Gemfile
gem 'virtus-uri', require: false
- Require it when you'd like to work with URIs:
require 'virtus'
require 'virtus/uri'
class Request
include Virtus
attribute :url, URI
end
- Work with URIs:
Request.new(url: 'http://example.com').url == URI('http://example.com')
License
MIT