Class: ShortURL::Services::Lns

Inherits:
ShortURL::Service show all
Defined in:
lib/shorturl/services/lns.rb

Instance Attribute Summary

Attributes inherited from ShortURL::Service

#action, #block, #code, #field, #method, #port, #response_block, #ssl

Instance Method Summary collapse

Methods inherited from ShortURL::Service

#call, #on_response

Constructor Details

#initializeLns

Returns a new instance of Lns.



5
6
7
8
9
10
# File 'lib/shorturl/services/lns.rb', line 5

def initialize
  super("ln-s.net")

  @method = :get
  @action = "/home/api.jsp"
end

Instance Method Details

#on_body(body) ⇒ Object



12
13
14
# File 'lib/shorturl/services/lns.rb', line 12

def on_body(body)
  URI.extract(body)[0]
end