Class ShortURL
In: lib/shorturl.rb
Parent: Object

Methods

Public Class methods

Main method of ShortURL, its usage is quite simple, just give an url to shorten and an optional service. If no service is selected, RubyURL.com will be used. An invalid service symbol will raise an ArgumentError exception

Valid service values:

  • :rubyurl
  • :tinyurl
  • :shorl
  • :snipurl
  • :metamark
  • :makeashorterlink
  • :skinnylink
  • :linktrim
  • :shorterlink
  • :minlink
  • :lns
  • :fyad
  • :d62
  • :shiturl
  • :littlink
  • :clipurl
  • :shortify
  • :orz

call-seq:

  ShortURL.shorten("http://mypage.com") => Uses RubyURL
  ShortURL.shorten("http://mypage.com", :tinyurl)

[Validate]