Class: Shortie::Shorteners::Lns
- Inherits:
-
BaseShortener
- Object
- BaseShortener
- Shortie::Shorteners::Lns
- Defined in:
- lib/shortie/shorteners/lns.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 9 10 11 12 13 14 |
# File 'lib/shortie/shorteners/lns.rb', line 4 def shorten ret = SimpleHttp.post("http://ln-s.net/home/api.jsp", { "url" => url }) status, = ret.split(/ /, 2) .chomp! raise unless status == "200" end |