Earl
What URI wishes it could look like.
Installation
Add this line to your application's Gemfile:
gem 'earl'
And then execute:
$ bundle
Or install it yourself as:
$ gem install earl
Usage
url = Earl::URL.new 'http://www.foo.com'
url.scheme # => 'http'
url.scheme? # => true
url.subdomain # => 'www'
url.subdomain.www? # => true
url.subdomain.baz? # => false
url.host = 'foo.edu'
url.to_s # => 'http://www.foo.edu'
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request