Class: Shortie::Shorteners::Metamark
- Inherits:
-
BaseShortener
- Object
- BaseShortener
- Shortie::Shorteners::Metamark
- Defined in:
- lib/shortie/shorteners/metamark.rb
Instance Attribute Summary
Attributes inherited from BaseShortener
Instance Method Summary collapse
Methods inherited from BaseShortener
Constructor Details
This class inherits a constructor from Shortie::BaseShortener
Instance Method Details
#shorten ⇒ Object
4 5 6 7 8 |
# File 'lib/shortie/shorteners/metamark.rb', line 4 def shorten url = SimpleHttp.get("http://metamark.net/api/rest/simple?long_url=#{escaped_url}") raise url if url =~ /^ERROR:/ url end |